<!doctype html>
<html lang="ru" data-bs-theme="dark">

<head>
    <!-- 2024-05-11 05:40:35 -->
        <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>git worktree</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.1.0/css/flag-icons.min.css" integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link href="../../../runebook.css" rel="stylesheet" type="text/css">
    <meta name="x-github" content="https://github.com/runebookdev/runebook">
            <meta name="x-i18n-doc" content="git">
        <script>
        function i18n(element) {
            // NOP
        }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.js" integrity="sha512-F/dia2jKME12jwqiYDayeD+Rr/8jTWUD2wfbuJB0bzSwenSEnXsn4qQ/wVyXUCix5bmCAj8xJdtFr2OqUtjLAw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js" integrity="sha512-D9LDs8YUUVa4V9Gl4Zb+xqRAc7RCzooR3+zzebgK2RMu/KU+dh90pbjEEMzPiSyRSGbSp9j1pZnrO4joGa5WEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg==" crossorigin="anonymous"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6424571640879890" crossorigin="anonymous"></script>    <script async src="https://www.googletagmanager.com/gtag/js?id=G-3G5BZ1QEDP"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-3G5BZ1QEDP');
</script>    <script>
(function(c, l, a, r, i, t, y) {
    c[a] = c[a] || function() {
        (c[a].q = c[a].q || []).push(arguments)
    };
    t = l.createElement(r);
    t.async = 1;
    t.src = "https://www.clarity.ms/tag/" + i + "?ref=bwt";
    y = l.getElementsByTagName(r)[0];
    y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "jto2hd94r9");
</script>    <script src="../../../theme.js"></script>
</head>

<body>
    <header class="bg-black">
        <div class="container">
            <div class="row">
                <div class="col">
                    <nav class="navbar navbar-expand-lg navbar-dark">
                        <a class="navbar-brand fw-bold" href="https://runebook.dev/ru">
                            <img alt="Runebook.dev" class="d-inline-block align-top mr-1" src="../../../assets/runebook_logo.webp" width="24" height="24">
                            Runebook.dev
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/ru#docs">Documentation</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/contributors">Contributors</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://github.com/runebookdev/runebook/issues">GitHub</a>
                                </li>
                            </ul>
                                                                                                <button class="btn btn-success ms-2" id="showPopupButton">
                                        <i class="bi bi-translate"></i>
                                        Show English
                                    </button>
                                                                                        <div class="form-check form-switch ms-3">
                                <label class="text-light">
                                    <input class="form-check-input" type="checkbox" role="switch" id="theme-switch" checked>
                                    <i class="bi bi-moon-stars-fill"></i>
                                </label>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
    </header>

    <!--sse-->
    <div class="container">
    <div class="row">
        <div class="col">
            <nav aria-label="breadcrumb" class="mt-2">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item">
                        <a href="https://runebook.dev/ru#docs">
                            <span class="fi fi-ru"></span>                            Русский                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <a href="-index-.html">
                            Git                            2.43                        </a>
                    </li>
                                            <li class="breadcrumb-item">
                            <a href="-index-.html#___________________">
                                Ветвление и слияние                            </a>
                        </li>
                                    </ol>
            </nav>
        </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-9">
            <main>
                <article>

                    
                    <h1 class="text-body-emphasis" ><span data-i18n="abf60bb649d7d691484dc6f3e0709ce337dfe7628d9b569a1cf9f145773a650b/5a" data-source="git-worktree" onmousemove="i18n(this)">git-worktree</span></h1> <h2 class="text-body-emphasis"  id="_name"><span data-i18n="dcd1d5223f73b3a965c07e3ff5dbee3eedcfedb806686a05b9b3868a2c3d6d50/3a" data-source="Name" onmousemove="i18n(this)">Name</span></h2> <div> <p><span data-i18n="5931dd3fdfa2caf97537aa058aa4b8174f5bab9383612d7cd48a5fd24603e432/03" data-source="git-worktree - Manage multiple working trees" onmousemove="i18n(this)">git-worktree &mdash; &Ucy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&mcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy;&icy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&mcy;&icy;</span></p> </div> <h2 class="text-body-emphasis"  id="_synopsis"><span data-i18n="8eb3755381519d7f0479d75446e56e20084834c0460d7ec94926932372ea6c47/0d" data-source="Synopsis" onmousemove="i18n(this)">Synopsis</span></h2> <div> <div> <pre class="hljs language-scss">git worktree add <span class="hljs-selector-attr">[-f]</span> <span class="hljs-selector-attr">[--detach]</span> <span class="hljs-selector-attr">[--checkout]</span> <span class="hljs-selector-attr">[--lock [--reason &lt;string&gt;]</span>]
                   <span class="hljs-selector-attr">[--orphan]</span> <span class="hljs-selector-attr">[(-b | -B) &lt;new-branch&gt;]</span> &lt;path&gt; <span class="hljs-selector-attr">[&lt;commit-ish&gt;]</span>
git worktree list <span class="hljs-selector-attr">[-v | --porcelain [-z]</span>]
git worktree lock <span class="hljs-selector-attr">[--reason &lt;string&gt;]</span> &lt;worktree&gt;
git worktree move &lt;worktree&gt; &lt;new-path&gt;
git worktree prune <span class="hljs-selector-attr">[-n]</span> <span class="hljs-selector-attr">[-v]</span> <span class="hljs-selector-attr">[--expire &lt;expire&gt;]</span>
git worktree remove <span class="hljs-selector-attr">[-f]</span> &lt;worktree&gt;
git worktree repair <span class="hljs-selector-attr">[&lt;path&gt;&hellip;&ZeroWidthSpace;]</span>
git worktree unlock &lt;worktree&gt;</pre> </div> </div> <h2 class="text-body-emphasis"  id="_description"><span data-i18n="526e0087cc3f254d9f86f6c7d8e23d954c4dfda2b312efc29194ae8a860106ba/d3" data-source="Description" onmousemove="i18n(this)">Description</span></h2> <div> <p><span data-i18n="9e4ed9f99915cb1572fcd77d6f78e451f4bcca3fdc07b6b90289117e18dd4fd1/c1" data-source="Manage multiple working trees attached to the same repository." onmousemove="i18n(this)">&Ucy;&pcy;&rcy;&acy;&vcy;&lcy;&yacy;&jcy;&tcy;&iecy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&mcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy;&icy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&mcy;&icy;, &pcy;&rcy;&icy;&kcy;&rcy;&iecy;&pcy;&lcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy; &kcy; &ocy;&dcy;&ncy;&ocy;&mcy;&ucy; &icy; &tcy;&ocy;&mcy;&ucy; &zhcy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yucy;.</span></p> <p><span data-i18n="4d9c3e610020270746dfd9b689f58498a77d3695803f05c34874e8028059f713/7b" data-source="A git repository can support multiple working trees, allowing you to check out more than one branch at a time. With &lt;code&gt;git worktree add&lt;/code&gt; a new working tree is associated with the repository, along with additional metadata that differentiates that working tree from others in the same repository. The working tree, along with this metadata, is called a &amp;quot;worktree&amp;quot;." onmousemove="i18n(this)">&Rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  git  &mcy;&ocy;&zhcy;&iecy;&tcy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&tcy;&softcy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;, &chcy;&tcy;&ocy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &vcy;&acy;&mcy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&acy;&tcy;&softcy; &bcy;&ocy;&lcy;&iecy;&iecy; &ocy;&dcy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy; &ocy;&dcy;&ncy;&ocy;&vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;. &Vcy;  <code>git worktree add</code>  &scy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&mcy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ocy; &ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &vcy;&mcy;&iecy;&scy;&tcy;&iecy; &scy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&mcy;&icy; &mcy;&iecy;&tcy;&acy;&dcy;&acy;&ncy;&ncy;&ycy;&mcy;&icy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&yucy;&tcy; &ecy;&tcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ocy;&tcy; &dcy;&rcy;&ucy;&gcy;&icy;&khcy; &vcy; &tcy;&ocy;&mcy; &zhcy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;. &Rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &vcy;&mcy;&iecy;&scy;&tcy;&iecy; &scy; &ecy;&tcy;&icy;&mcy;&icy; &mcy;&iecy;&tcy;&acy;&dcy;&acy;&ncy;&ncy;&ycy;&mcy;&icy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;  &quot;worktree&quot; .</span></p> <p><span data-i18n="7ece8fe4519f12352b55ba427903ddd2bc9bf90e7db59544221199ee6cd42017/4e" data-source="This new worktree is called a &amp;quot;linked worktree&amp;quot; as opposed to the &amp;quot;main worktree&amp;quot; prepared by &lt;a href=&quot;git-init&quot;&gt;git-init[1]&lt;/a&gt; or &lt;a href=&quot;git-clone&quot;&gt;git-clone[1]&lt;/a&gt;. A repository has one main worktree (if it&amp;rsquo;s not a bare repository) and zero or more linked worktrees. When you are done with a linked worktree, remove it with &lt;code&gt;git worktree remove&lt;/code&gt;." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;  &quot;linked worktree&quot; , &vcy; &ocy;&tcy;&lcy;&icy;&chcy;&icy;&iecy; &ocy;&tcy;  &quot;main worktree&quot; , &scy;&ocy;&zcy;&dcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy;  <a href="git-init.html">git-init[1]</a>  &icy;&lcy;&icy;  <a href="git-clone.html">git-clone[1]</a> . &Rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &icy;&mcy;&iecy;&iecy;&tcy; &ocy;&dcy;&ncy;&ocy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; (&iecy;&scy;&lcy;&icy; &ecy;&tcy;&ocy; &ncy;&iecy; &pcy;&ucy;&scy;&tcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;) &icy; &ncy;&ocy;&lcy;&softcy; &icy;&lcy;&icy; &bcy;&ocy;&lcy;&iecy;&iecy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;. &Kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &zcy;&acy;&kcy;&ocy;&ncy;&chcy;&icy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy; &scy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;, &ucy;&dcy;&acy;&lcy;&icy;&tcy;&iecy; &iecy;&gcy;&ocy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git worktree remove</code>  .</span></p> <p><span data-i18n="d13c816ab8cc08f5063c4c89ac0014ce473b5a17d330acf07637fd790de43db4/99" data-source="In its simplest form, &lt;code&gt;git worktree add &amp;lt;path&amp;gt;&lt;/code&gt; automatically creates a new branch whose name is the final component of &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt;, which is convenient if you plan to work on a new topic. For instance, &lt;code&gt;git
worktree add ../hotfix&lt;/code&gt; creates new branch &lt;code&gt;hotfix&lt;/code&gt; and checks it out at path &lt;code&gt;../hotfix&lt;/code&gt;. To instead work on an existing branch in a new worktree, use &lt;code&gt;git worktree add &amp;lt;path&amp;gt; &amp;lt;branch&amp;gt;&lt;/code&gt;. On the other hand, if you just plan to make some experimental changes or do testing without disturbing existing development, it is often convenient to create a &lt;code&gt;throwaway&lt;/code&gt; worktree not associated with any branch. For instance, &lt;code&gt;git worktree add -d &amp;lt;path&amp;gt;&lt;/code&gt; creates a new worktree with a detached &lt;code&gt;HEAD&lt;/code&gt; at the same commit as the current branch." onmousemove="i18n(this)">&Vcy; &pcy;&rcy;&ocy;&scy;&tcy;&iecy;&jcy;&shcy;&iecy;&mcy; &vcy;&icy;&dcy;&iecy;  <code>git worktree add &lt;path&gt;</code>  &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;, &icy;&mcy;&yacy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&jcy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ycy;&mcy; &kcy;&ocy;&mcy;&pcy;&ocy;&ncy;&iecy;&ncy;&tcy;&ocy;&mcy;  <code>&lt;path&gt;</code> , &chcy;&tcy;&ocy; &ucy;&dcy;&ocy;&bcy;&ncy;&ocy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&lcy;&acy;&ncy;&icy;&rcy;&ucy;&iecy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&tcy;&softcy; &ncy;&acy;&dcy; &ncy;&ocy;&vcy;&ocy;&jcy; &tcy;&iecy;&mcy;&ocy;&jcy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>git
worktree add ../hotfix</code>  &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&vcy;&softcy;  <code>hotfix</code>  &icy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&iecy;&tcy; &iecy;&iecy; &pcy;&ocy; &pcy;&ucy;&tcy;&icy;  <code>../hotfix</code> . &CHcy;&tcy;&ocy;&bcy;&ycy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&tcy;&softcy; &scy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&iecy;&jcy; &vcy;&iecy;&tcy;&vcy;&softcy;&yucy; &vcy; &ncy;&ocy;&vcy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git worktree add &lt;path&gt; &lt;branch&gt;</code> . &Scy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ycy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &pcy;&lcy;&acy;&ncy;&icy;&rcy;&ucy;&iecy;&tcy;&iecy; &vcy;&ncy;&iecy;&scy;&tcy;&icy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &ecy;&kcy;&scy;&pcy;&iecy;&rcy;&icy;&mcy;&iecy;&ncy;&tcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &icy;&lcy;&icy; &pcy;&rcy;&ocy;&vcy;&iecy;&scy;&tcy;&icy; &tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;, &ncy;&iecy; &ncy;&acy;&rcy;&ucy;&shcy;&acy;&yacy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&ocy;&tcy;&kcy;&ucy;, &chcy;&acy;&scy;&tcy;&ocy; &bcy;&ycy;&vcy;&acy;&iecy;&tcy; &ucy;&dcy;&ocy;&bcy;&ncy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;  <code>throwaway</code> , &ncy;&iecy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&iecy; &ncy;&icy; &scy; &kcy;&acy;&kcy;&ocy;&jcy; &vcy;&iecy;&tcy;&vcy;&softcy;&yucy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>git worktree add -d &lt;path&gt;</code>  &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy; &ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&ncy;&ycy;&mcy;  <code>HEAD</code>  &pcy;&rcy;&icy; &tcy;&ocy;&jcy; &zhcy;&iecy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &chcy;&tcy;&ocy; &icy; &tcy;&iecy;&kcy;&ucy;&shchcy;&acy;&yacy; &vcy;&iecy;&tcy;&kcy;&acy;.</span></p> <p><span data-i18n="5393e9c58f0fc755c75f97a93ac7f4952ce623c0f5bde61df6934f3f3535b50b/85" data-source="If a working tree is deleted without using &lt;code&gt;git worktree remove&lt;/code&gt;, then its associated administrative files, which reside in the repository (see &amp;quot;DETAILS&amp;quot; below), will eventually be removed automatically (see &lt;code&gt;gc.worktreePruneExpire&lt;/code&gt; in &lt;a href=&quot;git-config&quot;&gt;git-config[1]&lt;/a&gt;), or you can run &lt;code&gt;git worktree prune&lt;/code&gt; in the main or any linked worktree to clean up any stale administrative files." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ocy; &bcy;&iecy;&zcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;  <code>git worktree remove</code> , &tcy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&iecy; &scy; &ncy;&icy;&mcy; &acy;&dcy;&mcy;&icy;&ncy;&icy;&scy;&tcy;&rcy;&acy;&tcy;&icy;&vcy;&ncy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;, &ncy;&acy;&khcy;&ocy;&dcy;&yacy;&shchcy;&icy;&iecy;&scy;&yacy; &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy; (&scy;&mcy;.  &quot;DETAILS&quot;  &ncy;&icy;&zhcy;&iecy;), &vcy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;&mcy; &icy;&tcy;&ocy;&gcy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ycy; &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; (&scy;&mcy;.  <code>gc.worktreePruneExpire</code>  &vcy;  <a href="git-config.html">git-config[1]</a> ), &lcy;&icy;&bcy;&ocy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;  <code>git worktree prune</code>  &vcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&mcy; &icy;&lcy;&icy; &lcy;&yucy;&bcy;&ocy;&mcy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&mcy; worktree &dcy;&lcy;&yacy; &ocy;&chcy;&icy;&scy;&tcy;&kcy;&icy; &ucy;&scy;&tcy;&acy;&rcy;&iecy;&vcy;&shcy;&icy;&khcy; &acy;&dcy;&mcy;&icy;&ncy;&icy;&scy;&tcy;&rcy;&acy;&tcy;&icy;&vcy;&ncy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;.</span></p> <p><span data-i18n="2c7c85ac288985d12a97415e31815c865fa76936980c3f529a0512b0cf2a3027/16" data-source="If the working tree for a linked worktree is stored on a portable device or network share which is not always mounted, you can prevent its administrative files from being pruned by issuing the &lt;code&gt;git worktree lock&lt;/code&gt; command, optionally specifying &lt;code&gt;--reason&lt;/code&gt; to explain why the worktree is locked." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &khcy;&rcy;&acy;&ncy;&icy;&tcy;&scy;&yacy; &ncy;&acy; &pcy;&ocy;&rcy;&tcy;&acy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;&iecy; &icy;&lcy;&icy; &vcy; &ocy;&bcy;&shchcy;&iecy;&jcy; &scy;&iecy;&tcy;&iecy;&vcy;&ocy;&jcy; &pcy;&acy;&pcy;&kcy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &ncy;&iecy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &pcy;&ocy;&dcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&acy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&tcy;&icy;&tcy;&softcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &iecy;&gcy;&ocy; &acy;&dcy;&mcy;&icy;&ncy;&icy;&scy;&tcy;&rcy;&acy;&tcy;&icy;&vcy;&ncy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &vcy;&vcy;&iecy;&dcy;&yacy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;  <code>git worktree lock</code> , &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &ucy;&kcy;&acy;&zcy;&acy;&vcy;  <code>--reason</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&bcy;&hardcy;&yacy;&scy;&ncy;&icy;&tcy;&softcy;, &pcy;&ocy;&chcy;&iecy;&mcy;&ucy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ocy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_commands"><span data-i18n="b269dc4e81a528a4d42e9e74101923514a626f55f8dd76b1461e0690e72d041a/f5" data-source="Commands" onmousemove="i18n(this)">Commands</span></h2> <div> <div> <dl> <dt id="Documentation/git-worktree.txt-addltpathgtltcommit-ishgt"><span data-i18n="975e0442d8f1311694d1f89f4b6f250204e1f9711df21199d76376bab5e64705/aa" data-source="add &amp;lt;path&amp;gt; [&amp;lt;commit-ish&amp;gt;]" onmousemove="i18n(this)">&dcy;&ocy;&bcy;&acy;&vcy;&icy;&tcy;&softcy; &lt;&pcy;&ucy;&tcy;&softcy;&gt; [&lt;&fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy;&gt;]</span></dt> <dd> <p><span data-i18n="001a39e33aaaba4b4ef406bd3f5a17ec5363128a16dd3fe1737bdb60a25d00f7/73" data-source="Create a worktree at &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; and checkout &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt; into it. The new worktree is linked to the current repository, sharing everything except per-worktree files such as &lt;code&gt;HEAD&lt;/code&gt;, &lt;code&gt;index&lt;/code&gt;, etc. As a convenience, &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt; may be a bare &amp;quot;&lt;code&gt;-&lt;/code&gt;&amp;quot;, which is synonymous with &lt;code&gt;@{-1}&lt;/code&gt;." onmousemove="i18n(this)">&Scy;&ocy;&zcy;&dcy;&acy;&jcy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;  <code>&lt;path&gt;</code>  &icy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&icy;&tcy;&iecy; &vcy; &ncy;&iecy;&gcy;&ocy;  <code>&lt;commit-ish&gt;</code> . &Ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ocy; &scy; &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&mcy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &vcy;&scy;&iecy;, &kcy;&rcy;&ocy;&mcy;&iecy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &tcy;&acy;&kcy;&icy;&khcy; &kcy;&acy;&kcy;  <code>HEAD</code> ,  <code>index</code>  &icy; &tcy;. &dcy;. &Dcy;&lcy;&yacy; &ucy;&dcy;&ocy;&bcy;&scy;&tcy;&vcy;&acy;  <code>&lt;commit-ish&gt;</code>  &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&rcy;&ocy;&scy;&tcy;&ycy;&mcy;  &quot;  <code>-</code>  &quot; , &chcy;&tcy;&ocy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &scy;&icy;&ncy;&ocy;&ncy;&icy;&mcy;&ocy;&mcy;  <code>@{-1}</code> .</span></p> <p><span data-i18n="82238ef3a3a2ac0390670e900189a390a89c1c8009e92ff6b6ad5dc60f04e95c/9d" data-source="If &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt; is a branch name (call it &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt;) and is not found, and neither &lt;code&gt;-b&lt;/code&gt; nor &lt;code&gt;-B&lt;/code&gt; nor &lt;code&gt;--detach&lt;/code&gt; are used, but there does exist a tracking branch in exactly one remote (call it &lt;code&gt;&amp;lt;remote&amp;gt;&lt;/code&gt;) with a matching name, treat as equivalent to:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy;  <code>&lt;commit-ish&gt;</code>  &mdash; &ecy;&tcy;&ocy; &icy;&mcy;&yacy; &vcy;&iecy;&tcy;&kcy;&icy; (&ncy;&acy;&zcy;&ocy;&vcy;&iecy;&mcy; &iecy;&iecy;  <code>&lt;branch&gt;</code> ) &icy; &ncy;&iecy; &ncy;&acy;&jcy;&dcy;&iecy;&ncy;&ocy;, &icy; &ncy;&icy;  <code>-b</code> , &ncy;&icy;  <code>-B</code> , &ncy;&icy;  <code>--detach</code>  &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&tcy;&scy;&yacy;, &ncy;&ocy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &vcy;&iecy;&tcy;&vcy;&softcy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy; &rcy;&ocy;&vcy;&ncy;&ocy; &ncy;&acy; &ocy;&dcy;&ncy;&ocy;&mcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy; (&ncy;&acy;&zcy;&ocy;&vcy;&iecy;&mcy; &iecy;&iecy;  <code>&lt;remote&gt;</code> ) &scy; &scy;&ocy;&vcy;&pcy;&acy;&dcy;&acy;&yucy;&shchcy;&icy;&mcy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;, &rcy;&acy;&scy;&scy;&mcy;&acy;&tcy;&rcy;&icy;&vcy;&acy;&jcy;&tcy;&iecy; &kcy;&acy;&kcy; &ecy;&kcy;&vcy;&icy;&vcy;&acy;&lcy;&iecy;&ncy;&tcy; &kcy;:</span></p> <div> <div> <pre class="hljs language-xml">$ git worktree add --track -b <span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">path</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">remote</span>&gt;</span>/<span class="hljs-tag">&lt;<span class="hljs-name">branch</span>&gt;</span></pre> </div> </div> <p><span data-i18n="4570dc5605d59ffecd2a1c21e4e18bd4c7a7cdf554b5a61abcd6a97a5272c447/5d" data-source="If the branch exists in multiple remotes and one of them is named by the &lt;code&gt;checkout.defaultRemote&lt;/code&gt; configuration variable, we&amp;rsquo;ll use that one for the purposes of disambiguation, even if the &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; isn&amp;rsquo;t unique across all remotes. Set it to e.g. &lt;code&gt;checkout.defaultRemote=origin&lt;/code&gt; to always checkout remote branches from there if &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; is ambiguous but exists on the &lt;code&gt;origin&lt;/code&gt; remote. See also &lt;code&gt;checkout.defaultRemote&lt;/code&gt; in &lt;a href=&quot;git-config&quot;&gt;git-config[1]&lt;/a&gt;." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&iecy;&tcy;&vcy;&softcy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &ncy;&acy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&khcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;&acy;&khcy; &icy; &ocy;&dcy;&icy;&ncy; &icy;&zcy; &ncy;&icy;&khcy; &ncy;&acy;&zcy;&vcy;&acy;&ncy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&ocy;&ncy;&ncy;&ocy;&jcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&jcy;  <code>checkout.defaultRemote</code> , &mcy;&ycy; &bcy;&ucy;&dcy;&iecy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &iecy;&iecy; &vcy; &tscy;&iecy;&lcy;&yacy;&khcy; &ucy;&scy;&tcy;&rcy;&acy;&ncy;&iecy;&ncy;&icy;&yacy; &ncy;&iecy;&ocy;&dcy;&ncy;&ocy;&zcy;&ncy;&acy;&chcy;&ncy;&ocy;&scy;&tcy;&icy;, &dcy;&acy;&zhcy;&iecy; &iecy;&scy;&lcy;&icy;  <code>&lt;branch&gt;</code>  &ncy;&iecy; &ucy;&ncy;&icy;&kcy;&acy;&lcy;&iecy;&ncy; &dcy;&lcy;&yacy; &vcy;&scy;&iecy;&khcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;. &Ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&iecy; &iecy;&gcy;&ocy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &ncy;&acy;  <code>checkout.defaultRemote=origin</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &pcy;&ocy;&lcy;&ucy;&chcy;&acy;&tcy;&softcy; &ocy;&tcy;&tcy;&ucy;&dcy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&iecy; &vcy;&iecy;&tcy;&kcy;&icy;, &iecy;&scy;&lcy;&icy;  <code>&lt;branch&gt;</code>  &ncy;&iecy;&ocy;&dcy;&ncy;&ocy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;, &ncy;&ocy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy;  <code>origin</code> . &Scy;&mcy;. &tcy;&acy;&kcy;&zhcy;&iecy;  <code>checkout.defaultRemote</code>  &vcy;  <a href="git-config.html">git-config[1]</a> .</span></p> <p><span data-i18n="83ccc58a347326b8cbe70700ddc0b52f157d3f0db7cbee311455265c60a56f71/3e" data-source="If &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt; is omitted and neither &lt;code&gt;-b&lt;/code&gt; nor &lt;code&gt;-B&lt;/code&gt; nor &lt;code&gt;--detach&lt;/code&gt; used, then, as a convenience, the new worktree is associated with a branch (call it &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt;) named after &lt;code&gt;$(basename &amp;lt;path&amp;gt;)&lt;/code&gt;. If &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; doesn&amp;rsquo;t exist, a new branch based on &lt;code&gt;HEAD&lt;/code&gt; is automatically created as if &lt;code&gt;-b &amp;lt;branch&amp;gt;&lt;/code&gt; was given. If &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; does exist, it will be checked out in the new worktree, if it&amp;rsquo;s not checked out anywhere else, otherwise the command will refuse to create the worktree (unless &lt;code&gt;--force&lt;/code&gt; is used)." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy;  <code>&lt;commit-ish&gt;</code>  &ocy;&pcy;&ucy;&shchcy;&iecy;&ncy; &icy; &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&tcy;&scy;&yacy; &ncy;&icy;  <code>-b</code> , &ncy;&icy;  <code>-B</code> , &ncy;&icy;  <code>--detach</code> , &tcy;&ocy; &dcy;&lcy;&yacy; &ucy;&dcy;&ocy;&bcy;&scy;&tcy;&vcy;&acy; &ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ocy; &scy; &vcy;&iecy;&tcy;&vcy;&softcy;&yucy; (&ncy;&acy;&zcy;&ocy;&vcy;&iecy;&mcy; &iecy;&iecy;  <code>&lt;branch&gt;</code> ), &ncy;&acy;&zcy;&vcy;&acy;&ncy;&ncy;&ocy;&jcy; &vcy; &chcy;&iecy;&scy;&tcy;&softcy;  <code>$(basename &lt;path&gt;)</code> . &IEcy;&scy;&lcy;&icy;  <code>&lt;branch&gt;</code>  &ncy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;, &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&ocy;&vcy;&acy;&yacy; &vcy;&iecy;&tcy;&vcy;&softcy; &ncy;&acy; &ocy;&scy;&ncy;&ocy;&vcy;&iecy;  <code>HEAD</code> , &kcy;&acy;&kcy; &iecy;&scy;&lcy;&icy; &bcy;&ycy; &bcy;&ycy;&lcy; &zcy;&acy;&dcy;&acy;&ncy;  <code>-b &lt;branch&gt;</code> . &IEcy;&scy;&lcy;&icy;  <code>&lt;branch&gt;</code>  &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;, &ocy;&ncy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy; &vcy; &ncy;&ocy;&vcy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &iecy;&scy;&lcy;&icy; &ocy;&ncy; &ncy;&iecy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy; &gcy;&dcy;&iecy;-&lcy;&icy;&bcy;&ocy; &iecy;&shchcy;&iecy;, &vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &ocy;&tcy;&kcy;&acy;&zhcy;&iecy;&tcy;&scy;&yacy; &scy;&ocy;&zcy;&dcy;&acy;&vcy;&acy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; (&iecy;&scy;&lcy;&icy; &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>--force</code> ).</span></p> <p><span data-i18n="90179f4556280bf5734986e75e411c12a32a304edf27a89402ebc75813c6faa2/f7" data-source="If &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt; is omitted, neither &lt;code&gt;--detach&lt;/code&gt;, or &lt;code&gt;--orphan&lt;/code&gt; is used, and there are no valid local branches (or remote branches if &lt;code&gt;--guess-remote&lt;/code&gt; is specified) then, as a convenience, the new worktree is associated with a new unborn branch named &lt;code&gt;&amp;lt;branch&amp;gt;&lt;/code&gt; (after &lt;code&gt;$(basename &amp;lt;path&amp;gt;)&lt;/code&gt; if neither &lt;code&gt;-b&lt;/code&gt; or &lt;code&gt;-B&lt;/code&gt; is used) as if &lt;code&gt;--orphan&lt;/code&gt; was passed to the command. In the event the repository has a remote and &lt;code&gt;--guess-remote&lt;/code&gt; is used, but no remote or local branches exist, then the command fails with a warning reminding the user to fetch from their remote first (or override by using &lt;code&gt;-f/--force&lt;/code&gt;)." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy;  <code>&lt;commit-ish&gt;</code>  &ocy;&pcy;&ucy;&shchcy;&iecy;&ncy;, &ncy;&icy;  <code>--detach</code> , &ncy;&icy;  <code>--orphan</code>  &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&tcy;&scy;&yacy;, &icy; &ncy;&iecy;&tcy; &dcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&mcy;&ycy;&khcy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy; (&icy;&lcy;&icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy;, &iecy;&scy;&lcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;  <code>--guess-remote</code> ), &tcy;&ocy; &dcy;&lcy;&yacy; &ucy;&dcy;&ocy;&bcy;&scy;&tcy;&vcy;&acy; &ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&vcy;&yacy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &scy; &ncy;&ocy;&vcy;&ocy;&jcy; &ncy;&iecy;&rcy;&ocy;&zhcy;&dcy;&iecy;&ncy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&vcy;&softcy;&yucy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>&lt;branch&gt;</code>  (&pcy;&ocy;&scy;&lcy;&iecy;  <code>$(basename &lt;path&gt;)</code> ). &iecy;&scy;&lcy;&icy; &ncy;&icy;  <code>-b</code> , &ncy;&icy;  <code>-B</code>  &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&tcy;&scy;&yacy;), &kcy;&acy;&kcy; &iecy;&scy;&lcy;&icy; &bcy;&ycy; &vcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy; &bcy;&ycy;&lcy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&ncy;  <code>--orphan</code> . &IEcy;&scy;&lcy;&icy; &ucy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &iecy;&scy;&tcy;&softcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&jcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy; &icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>--guess-remote</code> , &ncy;&ocy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &icy;&lcy;&icy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy; &ncy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;, &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&acy;&iecy;&tcy;&scy;&yacy; &scy; &ocy;&shcy;&icy;&bcy;&kcy;&ocy;&jcy; &scy; &pcy;&rcy;&iecy;&dcy;&ucy;&pcy;&rcy;&iecy;&zhcy;&dcy;&iecy;&ncy;&icy;&iecy;&mcy;, &ncy;&acy;&pcy;&ocy;&mcy;&icy;&ncy;&acy;&yucy;&shchcy;&icy;&mcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yucy; &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &scy;&ocy; &scy;&vcy;&ocy;&iecy;&gcy;&ocy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&acy; (&icy;&lcy;&icy; &pcy;&iecy;&rcy;&iecy;&ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>-f/--force</code>  ).</span></p> </dd> <dt id="Documentation/git-worktree.txt-list"><span data-i18n="a330395cc0a53ad1207736546afff4735940937564bbf75ce1edad40780d9139/71" data-source="list" onmousemove="i18n(this)">list</span></dt> <dd> <p><span data-i18n="47006e5f61a4bceac08fbc37f5b6ad8bfcc660c4031ecbc1733d66092e307572/52" data-source="List details of each worktree. The main worktree is listed first, followed by each of the linked worktrees. The output details include whether the worktree is bare, the revision currently checked out, the branch currently checked out (or &amp;quot;detached HEAD&amp;quot; if none), &amp;quot;locked&amp;quot; if the worktree is locked, &amp;quot;prunable&amp;quot; if the worktree can be pruned by the &lt;code&gt;prune&lt;/code&gt; command." onmousemove="i18n(this)">&Pcy;&iecy;&rcy;&iecy;&chcy;&icy;&scy;&lcy;&icy;&tcy;&iecy; &dcy;&iecy;&tcy;&acy;&lcy;&icy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &kcy;&acy;&zhcy;&dcy;&ocy;&iecy; &icy;&zcy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;. &Vcy;&ycy;&khcy;&ocy;&dcy;&ncy;&ycy;&iecy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &vcy;&kcy;&lcy;&yucy;&chcy;&acy;&yucy;&tcy; &vcy; &scy;&iecy;&bcy;&yacy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &ocy; &tcy;&ocy;&mcy;, &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &pcy;&ucy;&scy;&tcy;&ycy;&mcy;, &tcy;&iecy;&kcy;&ucy;&shchcy;&acy;&yacy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&acy;&yacy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&yacy;, &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&acy;&yacy; &vcy; &dcy;&acy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy; &vcy;&iecy;&tcy;&vcy;&softcy; (&icy;&lcy;&icy;  &quot;detached HEAD&quot; , &iecy;&scy;&lcy;&icy; &iecy;&iecy; &ncy;&iecy;&tcy;),  &quot;locked&quot; , &iecy;&scy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ocy;,  &quot;prunable&quot; , &iecy;&scy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &scy;&ocy;&kcy;&rcy;&acy;&shchcy;&iecy;&ncy;&ocy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ocy;&jcy;  <code>prune</code> .</span></p> </dd> <dt id="Documentation/git-worktree.txt-lock"><span data-i18n="0c030586945fe504b604ecc2e875c38ede400cd5cd73da9730302162e6b02c6f/b4" data-source="lock" onmousemove="i18n(this)">lock</span></dt> <dd> <p><span data-i18n="64b9e32196186bc699661c4e9ba6d31e04566332093234801ef716924fa41cc1/dc" data-source="If a worktree is on a portable device or network share which is not always mounted, lock it to prevent its administrative files from being pruned automatically. This also prevents it from being moved or deleted. Optionally, specify a reason for the lock with &lt;code&gt;--reason&lt;/code&gt;." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &ncy;&acy; &pcy;&iecy;&rcy;&iecy;&ncy;&ocy;&scy;&ncy;&ocy;&mcy; &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;&iecy; &icy;&lcy;&icy; &vcy; &scy;&iecy;&tcy;&iecy;&vcy;&ocy;&jcy; &pcy;&acy;&pcy;&kcy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &ncy;&iecy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &pcy;&ocy;&dcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&acy;, &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &iecy;&gcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&tcy;&icy;&tcy;&softcy; &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&ocy;&iecy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &acy;&dcy;&mcy;&icy;&ncy;&icy;&scy;&tcy;&rcy;&acy;&tcy;&icy;&vcy;&ncy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;. &Ecy;&tcy;&ocy; &tcy;&acy;&kcy;&zhcy;&iecy; &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&shchcy;&acy;&iecy;&tcy; &iecy;&gcy;&ocy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&iecy;&ncy;&icy;&iecy; &icy;&lcy;&icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy;. &Pcy;&rcy;&icy; &zhcy;&iecy;&lcy;&acy;&ncy;&icy;&icy; &ucy;&kcy;&acy;&zhcy;&icy;&tcy;&iecy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&ucy; &bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&kcy;&icy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>--reason</code> .</span></p> </dd> <dt id="Documentation/git-worktree.txt-move"><span data-i18n="683a62ce15fbabb1ac867022e56e6e4f4f581762d77c3abb2f8dc8b165b3b1b9/70" data-source="move" onmousemove="i18n(this)">move</span></dt> <dd> <p><span data-i18n="f52cfcd3589231656b42e67fd250c15ec20c23208c784182254364ef4473c3fa/d1" data-source="Move a worktree to a new location. Note that the main worktree or linked worktrees containing submodules cannot be moved with this command. (The &lt;code&gt;git worktree repair&lt;/code&gt; command, however, can reestablish the connection with linked worktrees if you move the main worktree manually.)" onmousemove="i18n(this)">&Pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&scy;&tcy;&icy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &vcy; &ncy;&ocy;&vcy;&ocy;&iecy; &mcy;&iecy;&scy;&tcy;&ocy;. &Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &icy;&lcy;&icy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&icy;&iecy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy;, &ncy;&iecy;&vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&scy;&tcy;&icy;&tcy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &ecy;&tcy;&ocy;&jcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;. (&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>git worktree repair</code>  &mcy;&ocy;&zhcy;&iecy;&tcy; &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; &scy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&mcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy;&icy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&mcy;&icy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&scy;&tcy;&icy;&tcy;&iecy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;.)</span></p> </dd> <dt id="Documentation/git-worktree.txt-prune"><span data-i18n="6c83126bfcb0c11f963495f9102d4a1ea0a90a7e1a65c67878bc7e1e18beac67/41" data-source="prune" onmousemove="i18n(this)">prune</span></dt> <dd> <p><span data-i18n="00f55fcb628361ddf542a182920851a9b583e8c023eb9e7ba568d7de34768b1d/bd" data-source="Prune worktree information in &lt;code&gt;$GIT_DIR/worktrees&lt;/code&gt;." onmousemove="i18n(this)">&Scy;&ocy;&kcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &vcy;  <code>$GIT_DIR/worktrees</code> .</span></p> </dd> <dt id="Documentation/git-worktree.txt-remove"><span data-i18n="7e5608ab610017afe6c1894fdd4f56848823dcb1d12302bd49751d16a290f774/2c" data-source="remove" onmousemove="i18n(this)">remove</span></dt> <dd> <p><span data-i18n="743fd928e2665c085df6b3cf68ecdeca94107043e35f3a3ac2d9d33059fc1042/46" data-source="Remove a worktree. Only clean worktrees (no untracked files and no modification in tracked files) can be removed. Unclean worktrees or ones with submodules can be removed with &lt;code&gt;--force&lt;/code&gt;. The main worktree cannot be removed." onmousemove="i18n(this)">&Ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;. &Ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&icy;&scy;&tcy;&ycy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy; (&bcy;&iecy;&zcy; &ncy;&iecy;&ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&mcy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy; &vcy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&mcy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&acy;&khcy;). &Ncy;&iecy;&ocy;&chcy;&icy;&shchcy;&iecy;&ncy;&ncy;&ycy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy; &icy;&lcy;&icy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy; &scy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;&mcy;&icy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>--force</code> . &Ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &ncy;&iecy;&vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;.</span></p> </dd> <dt id="Documentation/git-worktree.txt-repairltpathgt82308203"><span data-i18n="d5a295ae2b19322bb1938decc8140d404ba0a573fbe42e7bdae40ff8889818f2/1a" data-source="repair [&amp;lt;path&amp;gt;&amp;hellip;&amp;ZeroWidthSpace;]" onmousemove="i18n(this)">repair [&lt;path&gt;&hellip;&ZeroWidthSpace;]</span></dt> <dd> <p><span data-i18n="ee2a8e28857b0991fb206b8520b2bd53f0903d09c9969615be42652132f9202c/ea" data-source="Repair worktree administrative files, if possible, if they have become corrupted or outdated due to external factors." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&iecy; &acy;&dcy;&mcy;&icy;&ncy;&icy;&scy;&tcy;&rcy;&acy;&tcy;&icy;&vcy;&ncy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &iecy;&scy;&lcy;&icy; &ocy;&ncy;&icy; &bcy;&ycy;&lcy;&icy; &pcy;&ocy;&vcy;&rcy;&iecy;&zhcy;&dcy;&iecy;&ncy;&ycy; &icy;&lcy;&icy; &ucy;&scy;&tcy;&acy;&rcy;&iecy;&lcy;&icy; &icy;&zcy;-&zcy;&acy; &vcy;&ncy;&iecy;&shcy;&ncy;&icy;&khcy; &fcy;&acy;&kcy;&tcy;&ocy;&rcy;&ocy;&vcy;.</span></p> <p><span data-i18n="4390d11f0b0ff6299b612bdbbb1ef410fabc20852a9c06466162c954d0770c05/7c" data-source="For instance, if the main worktree (or bare repository) is moved, linked worktrees will be unable to locate it. Running &lt;code&gt;repair&lt;/code&gt; in the main worktree will reestablish the connection from linked worktrees back to the main worktree." onmousemove="i18n(this)">&Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &iecy;&scy;&lcy;&icy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; (&icy;&lcy;&icy; &pcy;&ucy;&scy;&tcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;) &bcy;&ucy;&dcy;&iecy;&tcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&iecy;&ncy;&ocy;, &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy; &ncy;&iecy; &scy;&mcy;&ocy;&gcy;&ucy;&tcy; &iecy;&gcy;&ocy; &ncy;&acy;&jcy;&tcy;&icy;. &Zcy;&acy;&pcy;&ucy;&scy;&kcy;  <code>repair</code>  &vcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy; &scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy; &scy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ycy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;.</span></p> <p><span data-i18n="46f88de86b39fb462225ecff1e49b75d28bc152133ce41c782a93d7b71f7c1f4/e9" data-source="Similarly, if the working tree for a linked worktree is moved without using &lt;code&gt;git worktree move&lt;/code&gt;, the main worktree (or bare repository) will be unable to locate it. Running &lt;code&gt;repair&lt;/code&gt; within the recently-moved worktree will reestablish the connection. If multiple linked worktrees are moved, running &lt;code&gt;repair&lt;/code&gt; from any worktree with each tree&amp;rsquo;s new &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; as an argument, will reestablish the connection to all the specified paths." onmousemove="i18n(this)">&Acy;&ncy;&acy;&lcy;&ocy;&gcy;&icy;&chcy;&ncy;&ocy;, &iecy;&scy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&acy;&iecy;&tcy;&scy;&yacy; &bcy;&iecy;&zcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;  <code>git worktree move</code> , &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; (&icy;&lcy;&icy; &pcy;&ucy;&scy;&tcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;) &ncy;&iecy; &scy;&mcy;&ocy;&zhcy;&iecy;&tcy; &iecy;&gcy;&ocy; &ncy;&acy;&jcy;&tcy;&icy;. &Zcy;&acy;&pcy;&ucy;&scy;&kcy;  <code>repair</code>  &vcy; &ncy;&iecy;&dcy;&acy;&vcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&iecy;&ncy;&ncy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy; &scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy;. &IEcy;&scy;&lcy;&icy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&iecy;&ncy;&ocy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;, &zcy;&acy;&pcy;&ucy;&scy;&kcy;  <code>repair</code>  &icy;&zcy; &lcy;&yucy;&bcy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &scy; &ncy;&ocy;&vcy;&ycy;&mcy;  <code>&lt;path&gt;</code>  &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&acy; &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy; &scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; &scy;&ocy; &vcy;&scy;&iecy;&mcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ycy;&mcy;&icy; &pcy;&ucy;&tcy;&yacy;&mcy;&icy;.</span></p> <p><span data-i18n="4abf10efc2841fa1176ad08c487160deb5f2be1a2d0fbd2458a346ac2ab2d3c4/24" data-source="If both the main worktree and linked worktrees have been moved manually, then running &lt;code&gt;repair&lt;/code&gt; in the main worktree and specifying the new &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; of each linked worktree will reestablish all connections in both directions." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &icy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &icy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy; &bcy;&ycy;&lcy;&icy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&iecy;&ncy;&ycy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;, &tcy;&ocy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;  <code>repair</code>  &vcy; &gcy;&lcy;&acy;&vcy;&ncy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&icy;&iecy; &ncy;&ocy;&vcy;&ocy;&gcy;&ocy;  <code>&lt;path&gt;</code>  &dcy;&lcy;&yacy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy; &vcy;&scy;&iecy; &scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &ocy;&bcy;&ocy;&icy;&khcy; &ncy;&acy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy;&khcy;.</span></p> </dd> <dt id="Documentation/git-worktree.txt-unlock"><span data-i18n="787600ebe6d6c75b6bc0b2db0bfd6aeec78897b67d3192e2208bc8b714237841/03" data-source="unlock" onmousemove="i18n(this)">unlock</span></dt> <dd> <p><span data-i18n="b1921c13155544f4ccbd3122f05b332ab61a51d61141c7ebd2ed19f0f783f753/14" data-source="Unlock a worktree, allowing it to be pruned, moved or deleted." onmousemove="i18n(this)">&Rcy;&acy;&zcy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &iecy;&gcy;&ocy; &mcy;&ocy;&zhcy;&ncy;&ocy; &bcy;&ycy;&lcy;&ocy; &ocy;&bcy;&rcy;&iecy;&zcy;&acy;&tcy;&softcy;, &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&acy;&tcy;&softcy; &icy;&lcy;&icy; &ucy;&dcy;&acy;&lcy;&yacy;&tcy;&softcy;.</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_options"><span data-i18n="d0db8b5e364b6989e4b8f38a2b3846b87d99a51c1592ebf35d21cc66405a8e39/b6" data-source="Options" onmousemove="i18n(this)">Options</span></h2> <div> <div> <dl> <dt id="Documentation/git-worktree.txt--f"><span data-i18n="0e6503c1ece40e4ea7668463248ea2716eb37643f2c2c605f8bcee4d195a1705/83" data-source="-f" onmousemove="i18n(this)">-f</span></dt> <dt id="Documentation/git-worktree.txt---force"><span data-i18n="be262a109369ff4174b4b7a7aa917a83ca99dc94093be7d497384bb8c0f9cee6/ef" data-source="--force" onmousemove="i18n(this)">--force</span></dt> <dd> <p><span data-i18n="74ee9460a8d0f5ed6ebba1ac820ff5b21b8ebcc6c3e125e1ac44fa99d6265805/b1" data-source="By default, &lt;code&gt;add&lt;/code&gt; refuses to create a new worktree when &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt; is a branch name and is already checked out by another worktree, or if &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; is already assigned to some worktree but is missing (for instance, if &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; was deleted manually). This option overrides these safeguards. To add a missing but locked worktree path, specify &lt;code&gt;--force&lt;/code&gt; twice." onmousemove="i18n(this)">&Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;  <code>add</code>  &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &scy;&ocy;&zcy;&dcy;&acy;&vcy;&acy;&tcy;&softcy; &ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &iecy;&scy;&lcy;&icy;  <code>&lt;commit-ish&gt;</code>  &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy; &vcy;&iecy;&tcy;&kcy;&icy; &icy; &ucy;&zhcy;&iecy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ocy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;, &icy;&lcy;&icy; &iecy;&scy;&lcy;&icy;  <code>&lt;path&gt;</code>  &ucy;&zhcy;&iecy; &ncy;&acy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy; &kcy;&acy;&kcy;&ocy;&mcy;&ucy;-&lcy;&icy;&bcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&ucy;, &ncy;&ocy; &ocy;&tcy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &iecy;&scy;&lcy;&icy;  <code>&lt;path&gt;</code>  &bcy;&ycy;&lcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;). &Ecy;&tcy;&acy; &ocy;&pcy;&tscy;&icy;&yacy; &ocy;&tcy;&mcy;&iecy;&ncy;&yacy;&iecy;&tcy; &ecy;&tcy;&icy; &mcy;&iecy;&rcy;&ycy; &bcy;&iecy;&zcy;&ocy;&pcy;&acy;&scy;&ncy;&ocy;&scy;&tcy;&icy;. &CHcy;&tcy;&ocy;&bcy;&ycy; &dcy;&ocy;&bcy;&acy;&vcy;&icy;&tcy;&softcy; &ocy;&tcy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&jcy;, &ncy;&ocy; &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&jcy; &pcy;&ucy;&tcy;&softcy; &kcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&ucy;, &dcy;&vcy;&acy;&zhcy;&dcy;&ycy; &ucy;&kcy;&acy;&zhcy;&icy;&tcy;&iecy;  <code>--force</code> .</span></p> <p><span data-i18n="8b8ed7926e0767120ea36b3ddf8829353ca1e69daa10644ca85a9dc7a9db16ce/7d" data-source="&lt;code&gt;move&lt;/code&gt; refuses to move a locked worktree unless &lt;code&gt;--force&lt;/code&gt; is specified twice. If the destination is already assigned to some other worktree but is missing (for instance, if &lt;code&gt;&amp;lt;new-path&amp;gt;&lt;/code&gt; was deleted manually), then &lt;code&gt;--force&lt;/code&gt; allows the move to proceed; use &lt;code&gt;--force&lt;/code&gt; twice if the destination is locked." onmousemove="i18n(this)"><code>move</code>  &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&acy;&tcy;&softcy; &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &iecy;&scy;&lcy;&icy;  <code>--force</code>  &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&ncy; &dcy;&vcy;&acy;&zhcy;&dcy;&ycy;. &IEcy;&scy;&lcy;&icy; &pcy;&ucy;&ncy;&kcy;&tcy; &ncy;&acy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy; &ucy;&zhcy;&iecy; &ncy;&acy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy; &kcy;&acy;&kcy;&ocy;&mcy;&ucy;-&lcy;&icy;&bcy;&ocy; &dcy;&rcy;&ucy;&gcy;&ocy;&mcy;&ucy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&ucy;, &ncy;&ocy; &ocy;&tcy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &iecy;&scy;&lcy;&icy;  <code>&lt;new-path&gt;</code>  &bcy;&ycy;&lcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;), &tcy;&ocy;  <code>--force</code>  &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&icy;&tcy;&softcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&iecy;&ncy;&icy;&iecy;; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>--force</code>  &dcy;&vcy;&acy;&zhcy;&dcy;&ycy;, &iecy;&scy;&lcy;&icy; &pcy;&ucy;&ncy;&kcy;&tcy; &ncy;&acy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy; &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;.</span></p> <p><span data-i18n="7b849fcc507090ecb1bdff7e325afb921e89d7a5cdbf08699cbd9fcd77b2a793/e7" data-source="&lt;code&gt;remove&lt;/code&gt; refuses to remove an unclean worktree unless &lt;code&gt;--force&lt;/code&gt; is used. To remove a locked worktree, specify &lt;code&gt;--force&lt;/code&gt; twice." onmousemove="i18n(this)"><code>remove</code>  &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &ucy;&dcy;&acy;&lcy;&yacy;&tcy;&softcy; &ncy;&iecy;&chcy;&icy;&scy;&tcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &iecy;&scy;&lcy;&icy; &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>--force</code> . &CHcy;&tcy;&ocy;&bcy;&ycy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &dcy;&vcy;&acy;&zhcy;&dcy;&ycy; &ucy;&kcy;&acy;&zhcy;&icy;&tcy;&iecy;  <code>--force</code> .</span></p> </dd> <dt id="Documentation/git-worktree.txt--bltnew-branchgt"><span data-i18n="a17eec625277c75cd68f7901800f745852b1a10ac7e750c393d625916c07e2ac/86" data-source="-b &amp;lt;new-branch&amp;gt;" onmousemove="i18n(this)">-b &lt;new-branch&gt;</span></dt> <dt id="Documentation/git-worktree.txt--Bltnew-branchgt"><span data-i18n="abfe1fcacc3b3436bcd22008521f92cdd9cc0a207f768008c20eac7e35570946/64" data-source="-B &amp;lt;new-branch&amp;gt;" onmousemove="i18n(this)">-B &lt;new-branch&gt;</span></dt> <dd> <p><span data-i18n="14dbe7b241dcd8c98fc8dabf50dcf2fc664e8d0a38584087fdaf619ddf56a308/00" data-source="With &lt;code&gt;add&lt;/code&gt;, create a new branch named &lt;code&gt;&amp;lt;new-branch&amp;gt;&lt;/code&gt; starting at &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt;, and check out &lt;code&gt;&amp;lt;new-branch&amp;gt;&lt;/code&gt; into the new worktree. If &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt; is omitted, it defaults to &lt;code&gt;HEAD&lt;/code&gt;. By default, &lt;code&gt;-b&lt;/code&gt; refuses to create a new branch if it already exists. &lt;code&gt;-B&lt;/code&gt; overrides this safeguard, resetting &lt;code&gt;&amp;lt;new-branch&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt;." onmousemove="i18n(this)">&Scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>add</code>  &scy;&ocy;&zcy;&dcy;&acy;&jcy;&tcy;&iecy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&vcy;&softcy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>&lt;new-branch&gt;</code> , &ncy;&acy;&chcy;&icy;&ncy;&acy;&yacy; &scy;  <code>&lt;commit-ish&gt;</code> , &icy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&icy;&tcy;&iecy;  <code>&lt;new-branch&gt;</code>  &vcy; &ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;. &IEcy;&scy;&lcy;&icy;  <code>&lt;commit-ish&gt;</code>  &ocy;&pcy;&ucy;&shchcy;&iecy;&ncy;, &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>HEAD</code> . &Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;  <code>-b</code>  &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &scy;&ocy;&zcy;&dcy;&acy;&vcy;&acy;&tcy;&softcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;, &iecy;&scy;&lcy;&icy; &ocy;&ncy;&acy; &ucy;&zhcy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;.  <code>-B</code>  &ocy;&tcy;&mcy;&iecy;&ncy;&yacy;&iecy;&tcy; &ecy;&tcy;&ucy; &zcy;&acy;&shchcy;&icy;&tcy;&ucy;, &scy;&bcy;&rcy;&acy;&scy;&ycy;&vcy;&acy;&yacy;  <code>&lt;new-branch&gt;</code>  &ncy;&acy;  <code>&lt;commit-ish&gt;</code> .</span></p> </dd> <dt id="Documentation/git-worktree.txt--d"><span data-i18n="50e09407a18bedd64baf0b99825a8178d7446731615b85452ea6b99573469dcc/b1" data-source="-d" onmousemove="i18n(this)">-d</span></dt> <dt id="Documentation/git-worktree.txt---detach"><span data-i18n="e99a133151b56c8dc47b3f2cb61e20c87d324ff787127783f1eb10a9e185d1d9/98" data-source="--detach" onmousemove="i18n(this)">--detach</span></dt> <dd> <p><span data-i18n="6afab391fd917e281a1466ab36a331945a36ec150ba0aade322094778d31ca41/fd" data-source="With &lt;code&gt;add&lt;/code&gt;, detach &lt;code&gt;HEAD&lt;/code&gt; in the new worktree. See &amp;quot;DETACHED HEAD&amp;quot; in &lt;a href=&quot;git-checkout&quot;&gt;git-checkout[1]&lt;/a&gt;." onmousemove="i18n(this)">&Scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>add</code>  &ocy;&tcy;&scy;&ocy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&iecy;  <code>HEAD</code>  &vcy; &ncy;&ocy;&vcy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;. &Scy;&mcy;.  &quot;DETACHED HEAD&quot;  &vcy;  <a href="git-checkout.html">git-checkout[1]</a> .</span></p> </dd> <dt id="Documentation/git-worktree.txt---no-checkout"><span data-i18n="769c590eb0e3e05d885d3f4de7ac07f4f5b20d48f16f9dfab0ba188a9cb65b51/2d" data-source="--[no-]checkout" onmousemove="i18n(this)">--[no-]checkout</span></dt> <dd> <p><span data-i18n="a0ab833fe5de164c1b38f748b0f9f451eb470c7a8e3b9ad0fb6f455f8ef48bb1/94" data-source="By default, &lt;code&gt;add&lt;/code&gt; checks out &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt;, however, &lt;code&gt;--no-checkout&lt;/code&gt; can be used to suppress checkout in order to make customizations, such as configuring sparse-checkout. See &amp;quot;Sparse checkout&amp;quot; in &lt;a href=&quot;git-read-tree&quot;&gt;git-read-tree[1]&lt;/a&gt;." onmousemove="i18n(this)">&Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;  <code>add</code>  &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&acy;&iecy;&tcy;  <code>&lt;commit-ish&gt;</code> , &ocy;&dcy;&ncy;&acy;&kcy;&ocy;  <code>--no-checkout</code>  &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &dcy;&lcy;&yacy; &pcy;&ocy;&dcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy;, &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&jcy;&kcy;&icy;, &tcy;&acy;&kcy;&icy;&iecy; &kcy;&acy;&kcy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&jcy;&kcy;&acy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ocy;&jcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&icy;. &Scy;&mcy;.  &quot;Sparse checkout&quot;  &vcy;  <a href="git-read-tree.html">git-read-tree[1]</a> .</span></p> </dd> <dt id="Documentation/git-worktree.txt---no-guess-remote"><span data-i18n="7cd58a26e8492e5c7ff1e0b7820fe00ae4b2e2bd8939eed08d12e5f9e5f57370/1a" data-source="--[no-]guess-remote" onmousemove="i18n(this)">--[no-]guess-remote</span></dt> <dd> <p><span data-i18n="b0075c0aebbd96a62ccfd94cd515456e2c1716946ee9addc35719c2427481ef1/fe" data-source="With &lt;code&gt;worktree add &amp;lt;path&amp;gt;&lt;/code&gt;, without &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt;, instead of creating a new branch from &lt;code&gt;HEAD&lt;/code&gt;, if there exists a tracking branch in exactly one remote matching the basename of &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt;, base the new branch on the remote-tracking branch, and mark the remote-tracking branch as &amp;quot;upstream&amp;quot; from the new branch." onmousemove="i18n(this)">&Scy;  <code>worktree add &lt;path&gt;</code>  , &bcy;&iecy;&zcy;  <code>&lt;commit-ish&gt;</code>  , &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&yacy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy; &icy;&zcy;  <code>HEAD</code>  , &iecy;&scy;&lcy;&icy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &vcy;&iecy;&tcy;&vcy;&softcy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy; &rcy;&ocy;&vcy;&ncy;&ocy; &ncy;&acy; &ocy;&dcy;&ncy;&ocy;&mcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy;, &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&iecy;&mcy; &bcy;&acy;&zcy;&ocy;&vcy;&ocy;&mcy;&ucy; &icy;&mcy;&iecy;&ncy;&icy;  <code>&lt;path&gt;</code>  , &scy;&ocy;&zcy;&dcy;&acy;&jcy;&tcy;&iecy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&vcy;&softcy; &ncy;&acy; &ocy;&scy;&ncy;&ocy;&vcy;&iecy; &vcy;&iecy;&tcy;&kcy;&icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy; &icy; &pcy;&ocy;&mcy;&iecy;&tcy;&softcy;&tcy;&iecy; &vcy;&iecy;&tcy;&vcy;&softcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy; &kcy;&acy;&kcy;  &quot;upstream&quot;  &icy;&zcy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;.</span></p> <p><span data-i18n="0bae7b9505cf3ba6547b25c4ea887bc83bfaa9e06bd1c12ee77189a069540908/89" data-source="This can also be set up as the default behaviour by using the &lt;code&gt;worktree.guessRemote&lt;/code&gt; config option." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&icy;&tcy;&softcy; &kcy;&acy;&kcy; &pcy;&ocy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yacy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy;  <code>worktree.guessRemote</code> .</span></p> </dd> <dt id="Documentation/git-worktree.txt---no-track"><span data-i18n="a6c09430d068d285b5d84b6561f1b3a7bfd6f8546417197b237645407037e92e/a7" data-source="--[no-]track" onmousemove="i18n(this)">--[no-]track</span></dt> <dd> <p><span data-i18n="a28123715770284e6a9dbf60e8147302b30e419bb8f940acceb02c5139a5e92a/24" data-source="When creating a new branch, if &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt; is a branch, mark it as &amp;quot;upstream&amp;quot; from the new branch. This is the default if &lt;code&gt;&amp;lt;commit-ish&amp;gt;&lt;/code&gt; is a remote-tracking branch. See &lt;code&gt;--track&lt;/code&gt; in &lt;a href=&quot;git-branch&quot;&gt;git-branch[1]&lt;/a&gt; for details." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&icy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;, &iecy;&scy;&lcy;&icy;  <code>&lt;commit-ish&gt;</code>  &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;, &ocy;&tcy;&mcy;&iecy;&tcy;&softcy;&tcy;&iecy; &iecy;&iecy; &kcy;&acy;&kcy;  &quot;upstream&quot;  &icy;&zcy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;. &Ecy;&tcy;&ocy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;, &iecy;&scy;&lcy;&icy;  <code>&lt;commit-ish&gt;</code>  &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &vcy;&iecy;&tcy;&vcy;&softcy;&yucy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy;. &Pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &vcy;  <code>--track</code>  &icy;  <a href="git-branch.html">git-branch[1]</a> .</span></p> </dd> <dt id="Documentation/git-worktree.txt---lock"><span data-i18n="9ee7a31da92fffa892a8dda49c8e87854a4107f9dc58efeb1320199ee65fed2e/6f" data-source="--lock" onmousemove="i18n(this)">--lock</span></dt> <dd> <p><span data-i18n="cdd12fc7a1ab05906f13b35358a1292d117ebfe547d350f4af3b36a02eb146c8/24" data-source="Keep the worktree locked after creation. This is the equivalent of &lt;code&gt;git worktree lock&lt;/code&gt; after &lt;code&gt;git worktree add&lt;/code&gt;, but without a race condition." onmousemove="i18n(this)">&Dcy;&iecy;&rcy;&zhcy;&icy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&mcy; &pcy;&ocy;&scy;&lcy;&iecy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&yacy;. &Ecy;&tcy;&ocy; &ecy;&kcy;&vcy;&icy;&vcy;&acy;&lcy;&iecy;&ncy;&tcy;  <code>git worktree lock</code>  &pcy;&ocy;&scy;&lcy;&iecy;  <code>git worktree add</code> , &ncy;&ocy; &bcy;&iecy;&zcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yacy; &gcy;&ocy;&ncy;&kcy;&icy;.</span></p> </dd> <dt id="Documentation/git-worktree.txt--n"><span data-i18n="5249f4fcc629efa0e6d6b2bf746b6c5de61611ce719ad61ac820fbe5c8cece66/28" data-source="-n" onmousemove="i18n(this)">-n</span></dt> <dt id="Documentation/git-worktree.txt---dry-run"><span data-i18n="675ca48430023bf861e914e0cf5bbe183efe84bd9d831affc574394bf4edc690/c1" data-source="--dry-run" onmousemove="i18n(this)">--dry-run</span></dt> <dd> <p><span data-i18n="858c521062fb71a03ba9733a475ffb9e152b7875310aaffd4a5e388c6ed8ec36/46" data-source="With &lt;code&gt;prune&lt;/code&gt;, do not remove anything; just report what it would remove." onmousemove="i18n(this)">&Scy;  <code>prune</code>  &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ncy;&iecy; &ucy;&dcy;&acy;&lcy;&yacy;&jcy;&tcy;&iecy;; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy; &ocy;&ncy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;.</span></p> </dd> <dt id="Documentation/git-worktree.txt---orphan"><span data-i18n="3e5904bf272f444345b80aa3e8f933a784995a26b53e1bfa734aef6b1ce20def/85" data-source="--orphan" onmousemove="i18n(this)">--orphan</span></dt> <dd> <p><span data-i18n="7fdd9cdae47c4ec49295691bd6d456366c9c65f6b33cbf02b2419839d539d12f/58" data-source="With &lt;code&gt;add&lt;/code&gt;, make the new worktree and index empty, associating the worktree with a new unborn branch named &lt;code&gt;&amp;lt;new-branch&amp;gt;&lt;/code&gt;." onmousemove="i18n(this)">&Scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>add</code>  &scy;&dcy;&iecy;&lcy;&acy;&jcy;&tcy;&iecy; &ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &pcy;&ucy;&scy;&tcy;&ycy;&mcy;&icy;, &scy;&vcy;&yacy;&zcy;&acy;&vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy; &ncy;&ocy;&vcy;&ocy;&jcy; &ncy;&iecy;&rcy;&ocy;&zhcy;&dcy;&iecy;&ncy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&vcy;&softcy;&yucy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>&lt;new-branch&gt;</code> .</span></p> </dd> <dt id="Documentation/git-worktree.txt---porcelain"><span data-i18n="99995b429bdc79d181ef1433b732eb66d793543f436f1d4858e72e12b9aeb7ee/95" data-source="--porcelain" onmousemove="i18n(this)">--porcelain</span></dt> <dd> <p><span data-i18n="18bc41b06b21b21888e728480b513056bfa2c6d16767f99f3c7d0a168e913091/62" data-source="With &lt;code&gt;list&lt;/code&gt;, output in an easy-to-parse format for scripts. This format will remain stable across Git versions and regardless of user configuration. It is recommended to combine this with &lt;code&gt;-z&lt;/code&gt;. See below for details." onmousemove="i18n(this)">&Scy;  <code>list</code>  &vcy;&ycy;&vcy;&ocy;&dcy;&icy;&tcy;&iecy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &vcy; &ucy;&dcy;&ocy;&bcy;&ncy;&ocy;&mcy; &dcy;&lcy;&yacy; &acy;&ncy;&acy;&lcy;&icy;&zcy;&acy; &fcy;&ocy;&rcy;&mcy;&acy;&tcy;&iecy; &dcy;&lcy;&yacy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&iecy;&vcy;. &Ecy;&tcy;&ocy;&tcy; &fcy;&ocy;&rcy;&mcy;&acy;&tcy; &ocy;&scy;&tcy;&acy;&ncy;&iecy;&tcy;&scy;&yacy; &scy;&tcy;&acy;&bcy;&icy;&lcy;&softcy;&ncy;&ycy;&mcy; &vcy;&ocy; &vcy;&scy;&iecy;&khcy; &vcy;&iecy;&rcy;&scy;&icy;&yacy;&khcy;  Git  &icy; &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy; &ocy;&tcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yacy;. &Rcy;&iecy;&kcy;&ocy;&mcy;&iecy;&ncy;&dcy;&ucy;&iecy;&tcy;&scy;&yacy; &kcy;&ocy;&mcy;&bcy;&icy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy; &scy;  <code>-z</code> . &Pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &ncy;&icy;&zhcy;&iecy;.</span></p> </dd> <dt id="Documentation/git-worktree.txt--z"><span data-i18n="cac3c371c8f2e17e79214e0fae22255e0f1fad169bac56d2f8a10d7fd54846cb/4d" data-source="-z" onmousemove="i18n(this)">-z</span></dt> <dd> <p><span data-i18n="8efda0ee7aa15e8fab358b9d670f2aa4ee0bffb4d751031bfc13b09f13a4f334/56" data-source="Terminate each line with a NUL rather than a newline when &lt;code&gt;--porcelain&lt;/code&gt; is specified with &lt;code&gt;list&lt;/code&gt;. This makes it possible to parse the output when a worktree path contains a newline character." onmousemove="i18n(this)">&Zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&tcy;&iecy; &kcy;&acy;&zhcy;&dcy;&ucy;&yucy; &scy;&tcy;&rcy;&ocy;&kcy;&ucy; NUL, &acy; &ncy;&iecy; &ncy;&ocy;&vcy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&ocy;&jcy;, &iecy;&scy;&lcy;&icy;  <code>--porcelain</code>  &ucy;&kcy;&acy;&zcy;&acy;&ncy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>list</code>  . &Ecy;&tcy;&ocy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &acy;&ncy;&acy;&lcy;&icy;&zcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy;&ycy;&khcy;&ocy;&dcy;&ncy;&ycy;&iecy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy;, &kcy;&ocy;&gcy;&dcy;&acy; &pcy;&ucy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &scy;&icy;&mcy;&vcy;&ocy;&lcy; &ncy;&ocy;&vcy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;.</span></p> </dd> <dt id="Documentation/git-worktree.txt--q"><span data-i18n="5ce681666a15a41274346f65b8bcbf56f8e8170ac00706a44a09ee4d786a8609/cd" data-source="-q" onmousemove="i18n(this)">-q</span></dt> <dt id="Documentation/git-worktree.txt---quiet"><span data-i18n="b00818cdc507640687732769ee1cb501db377927ee76d03df23978bd0d706888/e2" data-source="--quiet" onmousemove="i18n(this)">--quiet</span></dt> <dd> <p><span data-i18n="fd95acef3c31fa627776eda0860d5d7b5d3f865604c3a17c11f696986763ed71/6f" data-source="With &lt;code&gt;add&lt;/code&gt;, suppress feedback messages." onmousemove="i18n(this)">&Scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>add</code>  &pcy;&ocy;&dcy;&acy;&vcy;&lcy;&yacy;&jcy;&tcy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&yacy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy;&jcy; &scy;&vcy;&yacy;&zcy;&icy;.</span></p> </dd> <dt id="Documentation/git-worktree.txt--v"><span data-i18n="81c36ccd44ef18baabad6e2d87038b72d606263bd6a3432b964a872023654fff/7c" data-source="-v" onmousemove="i18n(this)">-v</span></dt> <dt id="Documentation/git-worktree.txt---verbose"><span data-i18n="bff1e8d3adf9e53481e9b21876983b359dc8a231bf7ebadde36a42dd7bd4db5c/93" data-source="--verbose" onmousemove="i18n(this)">--verbose</span></dt> <dd> <p><span data-i18n="dc4e0a89a2eeaed6a6f359eaa82fecb04e53dc545df4e03ddb331fa7b5a708a4/b6" data-source="With &lt;code&gt;prune&lt;/code&gt;, report all removals." onmousemove="i18n(this)">&Scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>prune</code>  &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&jcy;&tcy;&iecy; &ocy;&bcy;&ocy; &vcy;&scy;&iecy;&khcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy;&khcy;.</span></p> <p><span data-i18n="3e089e13769d5b313440d0bbcb6964645db141e076e6d7a60160d5ffcc7b75ad/0d" data-source="With &lt;code&gt;list&lt;/code&gt;, output additional information about worktrees (see below)." onmousemove="i18n(this)">&Scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>list</code>  &vcy;&ycy;&vcy;&iecy;&dcy;&icy;&tcy;&iecy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ucy;&yucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &ocy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&khcy; (&scy;&mcy;. &ncy;&icy;&zhcy;&iecy;).</span></p> </dd> <dt id="Documentation/git-worktree.txt---expirelttimegt"><span data-i18n="046a4582263c1718caa61262eeb90075285134863852db90e0409e9ea04fe7b0/b1" data-source="--expire &amp;lt;time&amp;gt;" onmousemove="i18n(this)">--expire &lt;time&gt;</span></dt> <dd> <p><span data-i18n="93025dc59fad0dbfc7f25cd388f8476c015707802c7d9e251afaa907a8646492/ab" data-source="With &lt;code&gt;prune&lt;/code&gt;, only expire unused worktrees older than &lt;code&gt;&amp;lt;time&amp;gt;&lt;/code&gt;." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&icy;  <code>prune</code>  &icy;&scy;&tcy;&iecy;&kcy;&acy;&iecy;&tcy; &scy;&rcy;&ocy;&kcy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&yacy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ncy;&iecy;&icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&ycy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy; &scy;&tcy;&acy;&rcy;&shcy;&iecy;  <code>&lt;time&gt;</code> .</span></p> <p><span data-i18n="6103a0b18290453c08780e9d2c75efc1208e82fe41f8631c2bbb463bf3eeb9b7/5f" data-source="With &lt;code&gt;list&lt;/code&gt;, annotate missing worktrees as prunable if they are older than &lt;code&gt;&amp;lt;time&amp;gt;&lt;/code&gt;." onmousemove="i18n(this)">&Scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>list</code>  &pcy;&ocy;&mcy;&iecy;&chcy;&acy;&jcy;&tcy;&iecy; &ocy;&tcy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy; &kcy;&acy;&kcy; &scy;&ocy;&kcy;&rcy;&acy;&shchcy;&acy;&iecy;&mcy;&ycy;&iecy;, &iecy;&scy;&lcy;&icy; &ocy;&ncy;&icy; &scy;&tcy;&acy;&rcy;&shcy;&iecy;  <code>&lt;time&gt;</code> .</span></p> </dd> <dt id="Documentation/git-worktree.txt---reasonltstringgt"><span data-i18n="c6b21771ce4b5ae57f4dde9b21e05cc3aff2aeaf7eaede534b40469fbdf34b4b/86" data-source="--reason &amp;lt;string&amp;gt;" onmousemove="i18n(this)">--reason &lt;string&gt;</span></dt> <dd> <p><span data-i18n="3e0dcca5174f946772e30963a936df1bac99f87f0bf72131bdbb485e3ff3169d/42" data-source="With &lt;code&gt;lock&lt;/code&gt; or with &lt;code&gt;add --lock&lt;/code&gt;, an explanation why the worktree is locked." onmousemove="i18n(this)">&Dcy;&lcy;&yacy;  <code>lock</code>  &icy;&lcy;&icy;  <code>add --lock</code>  &mdash; &ocy;&bcy;&hardcy;&yacy;&scy;&ncy;&iecy;&ncy;&icy;&iecy;, &pcy;&ocy;&chcy;&iecy;&mcy;&ucy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ocy;.</span></p> </dd> <dt id="Documentation/git-worktree.txt-ltworktreegt"><span data-i18n="6510a3ea571b0d156930a06f74a65edd40f82dcb55d818fcc8f33f5b31edb744/07" data-source="&amp;lt;worktree&amp;gt;" onmousemove="i18n(this)">&lt;worktree&gt;</span></dt> <dd> <p><span data-i18n="3689eceb038c8cd5ce593a0b99cbc8a8b83b672cfebbd58a0028fda1a98a1a07/fc" data-source="Worktrees can be identified by path, either relative or absolute." onmousemove="i18n(this)">&Rcy;&acy;&bcy;&ocy;&chcy;&icy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy; &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&dcy;&iecy;&ncy;&tcy;&icy;&fcy;&icy;&tscy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &pcy;&ocy; &pcy;&ucy;&tcy;&icy;, &ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&mcy;&ucy; &icy;&lcy;&icy; &acy;&bcy;&scy;&ocy;&lcy;&yucy;&tcy;&ncy;&ocy;&mcy;&ucy;.</span></p> <p><span data-i18n="79a10fbcd8fea0be2624b97e95cd87cde843d99189c4942db3dc9e9fce5f5624/11" data-source="If the last path components in the worktree&amp;rsquo;s path is unique among worktrees, it can be used to identify a worktree. For example if you only have two worktrees, at &lt;code&gt;/abc/def/ghi&lt;/code&gt; and &lt;code&gt;/abc/def/ggg&lt;/code&gt;, then &lt;code&gt;ghi&lt;/code&gt; or &lt;code&gt;def/ghi&lt;/code&gt; is enough to point to the former worktree." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&icy;&iecy; &kcy;&ocy;&mcy;&pcy;&ocy;&ncy;&iecy;&ncy;&tcy;&ycy; &pcy;&ucy;&tcy;&icy; &vcy; &pcy;&ucy;&tcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &ucy;&ncy;&icy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy; &scy;&rcy;&iecy;&dcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;, &iecy;&gcy;&ocy; &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &dcy;&lcy;&yacy; &icy;&dcy;&iecy;&ncy;&tcy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &iecy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &dcy;&vcy;&acy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;:  <code>/abc/def/ghi</code>  &icy;  <code>/abc/def/ggg</code> , &tcy;&ocy;  <code>ghi</code>  &icy;&lcy;&icy;  <code>def/ghi</code>  &dcy;&ocy;&scy;&tcy;&acy;&tcy;&ocy;&chcy;&ncy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &ncy;&acy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&iecy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;.</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_refs"><span data-i18n="070c43879109f485dfb6720321eaaeb8941316947c997241b53f4f50617b681c/d8" data-source="Refs" onmousemove="i18n(this)">Refs</span></h2> <div> <p><span data-i18n="78f1c85660167a1bb18dde8c377f337315000da818737eca26fa5f15e651d5cc/7a" data-source="When using multiple worktrees, some refs are shared between all worktrees, but others are specific to an individual worktree. One example is &lt;code&gt;HEAD&lt;/code&gt;, which is different for each worktree. This section is about the sharing rules and how to access refs of one worktree from another." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&icy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &scy;&scy;&ycy;&lcy;&kcy;&icy; &yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &ocy;&bcy;&shchcy;&icy;&mcy;&icy; &dcy;&lcy;&yacy; &vcy;&scy;&iecy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;, &acy; &dcy;&rcy;&ucy;&gcy;&icy;&iecy; &ocy;&tcy;&ncy;&ocy;&scy;&yacy;&tcy;&scy;&yacy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &kcy; &ocy;&tcy;&dcy;&iecy;&lcy;&softcy;&ncy;&ocy;&mcy;&ucy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&ucy;. &Ocy;&dcy;&ncy;&icy;&mcy; &icy;&zcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&ocy;&vcy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy;  <code>HEAD</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&iecy;&ncy; &dcy;&lcy;&yacy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Vcy; &ecy;&tcy;&ocy;&mcy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy; &rcy;&acy;&scy;&scy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &ocy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&acy;&khcy; &ocy;&bcy;&shchcy;&iecy;&gcy;&ocy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&acy; &icy; &ocy; &tcy;&ocy;&mcy;, &kcy;&acy;&kcy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy; &kcy; &scy;&scy;&ycy;&lcy;&kcy;&acy;&mcy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &icy;&zcy; &dcy;&rcy;&ucy;&gcy;&ocy;&gcy;&ocy;.</span></p> <p><span data-i18n="60b6069743b48910b32fcdbfbaa1e445c731451cedc9907db14dbc90b03c73b1/37" data-source="In general, all pseudo refs are per-worktree and all refs starting with &lt;code&gt;refs/&lt;/code&gt; are shared. Pseudo refs are ones like &lt;code&gt;HEAD&lt;/code&gt; which are directly under &lt;code&gt;$GIT_DIR&lt;/code&gt; instead of inside &lt;code&gt;$GIT_DIR/refs&lt;/code&gt;. There are exceptions, however: refs inside &lt;code&gt;refs/bisect&lt;/code&gt;, &lt;code&gt;refs/worktree&lt;/code&gt; and &lt;code&gt;refs/rewritten&lt;/code&gt; are not shared." onmousemove="i18n(this)">&Kcy;&acy;&kcy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&ocy;, &vcy;&scy;&iecy; &pcy;&scy;&iecy;&vcy;&dcy;&ocy;&scy;&scy;&ycy;&lcy;&kcy;&icy; &ocy;&tcy;&ncy;&ocy;&scy;&yacy;&tcy;&scy;&yacy; &kcy; &kcy;&acy;&zhcy;&dcy;&ocy;&mcy;&ucy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&ucy;, &acy; &vcy;&scy;&iecy; &scy;&scy;&ycy;&lcy;&kcy;&icy;, &ncy;&acy;&chcy;&icy;&ncy;&acy;&yucy;&shchcy;&icy;&iecy;&scy;&yacy; &scy;  <code>refs/</code> , &yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &ocy;&bcy;&shchcy;&icy;&mcy;&icy;. &Pcy;&scy;&iecy;&vcy;&dcy;&ocy;&scy;&scy;&ycy;&lcy;&kcy;&icy; &mdash; &ecy;&tcy;&ocy; &tcy;&acy;&kcy;&icy;&iecy;, &kcy;&acy;&kcy;  <code>HEAD</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &ncy;&acy;&khcy;&ocy;&dcy;&yacy;&tcy;&scy;&yacy; &ncy;&iecy;&pcy;&ocy;&scy;&rcy;&iecy;&dcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy; &pcy;&ocy;&dcy;  <code>$GIT_DIR</code> , &acy; &ncy;&iecy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy;  <code>$GIT_DIR/refs</code> . &Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &iecy;&scy;&tcy;&softcy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&yacy;: &scy;&scy;&ycy;&lcy;&kcy;&icy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy;  <code>refs/bisect</code> ,  <code>refs/worktree</code>  &icy;  <code>refs/rewritten</code>  &ncy;&iecy; &yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &ocy;&bcy;&shchcy;&icy;&mcy;&icy;.</span></p> <p><span data-i18n="03d4b66841f0852b8c0723738d57a2dbdccd8eafa270688c0c7bf3b24f730389/4b" data-source="Refs that are per-worktree can still be accessed from another worktree via two special paths, &lt;code&gt;main-worktree&lt;/code&gt; and &lt;code&gt;worktrees&lt;/code&gt;. The former gives access to per-worktree refs of the main worktree, while the latter to all linked worktrees." onmousemove="i18n(this)">&Dcy;&ocy;&scy;&tcy;&ucy;&pcy; &kcy; &scy;&scy;&ycy;&lcy;&kcy;&acy;&mcy;, &ocy;&tcy;&ncy;&ocy;&scy;&yacy;&shchcy;&icy;&mcy;&scy;&yacy; &kcy; &kcy;&acy;&zhcy;&dcy;&ocy;&mcy;&ucy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&ucy;, &pcy;&ocy;-&pcy;&rcy;&iecy;&zhcy;&ncy;&iecy;&mcy;&ucy; &mcy;&ocy;&zhcy;&ncy;&ocy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &icy;&zcy; &dcy;&rcy;&ucy;&gcy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &pcy;&ocy; &dcy;&vcy;&ucy;&mcy; &scy;&pcy;&iecy;&tscy;&icy;&acy;&lcy;&softcy;&ncy;&ycy;&mcy; &pcy;&ucy;&tcy;&yacy;&mcy;:  <code>main-worktree</code>  &icy;  <code>worktrees</code> . &Pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &pcy;&rcy;&iecy;&dcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy; &kcy; &scy;&scy;&ycy;&lcy;&kcy;&acy;&mcy; &ncy;&acy; &kcy;&acy;&zhcy;&dcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &acy; &vcy;&tcy;&ocy;&rcy;&ocy;&jcy; &mdash; &kcy;&ocy; &vcy;&scy;&iecy;&mcy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&mcy;.</span></p> <p><span data-i18n="b98b1cecdcd76a25975279cb861a1205ad45b79e6d6bdc656272d32972a27d9a/ec" data-source="For example, &lt;code&gt;main-worktree/HEAD&lt;/code&gt; or &lt;code&gt;main-worktree/refs/bisect/good&lt;/code&gt; resolve to the same value as the main worktree&amp;rsquo;s &lt;code&gt;HEAD&lt;/code&gt; and &lt;code&gt;refs/bisect/good&lt;/code&gt; respectively. Similarly, &lt;code&gt;worktrees/foo/HEAD&lt;/code&gt; or &lt;code&gt;worktrees/bar/refs/bisect/bad&lt;/code&gt; are the same as &lt;code&gt;$GIT_COMMON_DIR/worktrees/foo/HEAD&lt;/code&gt; and &lt;code&gt;$GIT_COMMON_DIR/worktrees/bar/refs/bisect/bad&lt;/code&gt;." onmousemove="i18n(this)">&Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>main-worktree/HEAD</code>  &icy;&lcy;&icy;  <code>main-worktree/refs/bisect/good</code>  &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&acy;&yucy;&tcy;&scy;&yacy; &vcy; &tcy;&ocy; &zhcy;&iecy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &icy;  <code>HEAD</code>  &icy;  <code>refs/bisect/good</code>  &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;. &Acy;&ncy;&acy;&lcy;&ocy;&gcy;&icy;&chcy;&ncy;&ocy;,  <code>worktrees/foo/HEAD</code>  &icy;&lcy;&icy;  <code>worktrees/bar/refs/bisect/bad</code>  &acy;&ncy;&acy;&lcy;&ocy;&gcy;&icy;&chcy;&ncy;&ycy;  <code>$GIT_COMMON_DIR/worktrees/foo/HEAD</code>  &icy;  <code>$GIT_COMMON_DIR/worktrees/bar/refs/bisect/bad</code> .</span></p> <p><span data-i18n="68190976eb69b33f48eacdd24c4dfabb2890f911ea4c3dc5f1086d3a1d441d62/41" data-source="To access refs, it&amp;rsquo;s best not to look inside &lt;code&gt;$GIT_DIR&lt;/code&gt; directly. Instead use commands such as &lt;a href=&quot;git-rev-parse&quot;&gt;git-rev-parse[1]&lt;/a&gt; or &lt;a href=&quot;git-update-ref&quot;&gt;git-update-ref[1]&lt;/a&gt; which will handle refs correctly." onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy; &kcy; &scy;&scy;&ycy;&lcy;&kcy;&acy;&mcy;, &lcy;&ucy;&chcy;&shcy;&iecy; &ncy;&iecy; &zcy;&acy;&gcy;&lcy;&yacy;&dcy;&ycy;&vcy;&acy;&tcy;&softcy; &vcy;&ncy;&ucy;&tcy;&rcy;&softcy;  <code>$GIT_DIR</code>  &ncy;&acy;&pcy;&rcy;&yacy;&mcy;&ucy;&yucy;. &Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy; &tcy;&acy;&kcy;&icy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;, &kcy;&acy;&kcy;  <a href="git-rev-parse.html">git-rev-parse[1]</a>  &icy;&lcy;&icy;  <a href="git-update-ref.html">git-update-ref[1]</a> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&softcy;&ncy;&ocy; &ocy;&bcy;&rcy;&acy;&bcy;&acy;&tcy;&ycy;&vcy;&acy;&tcy;&softcy; &scy;&scy;&ycy;&lcy;&kcy;&icy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_configuration_file"><span data-i18n="f1c216ddf2b88463bca7371a6128e9db57b62654ed93e2201252ab2bce2858f8/b7" data-source="Configuration file" onmousemove="i18n(this)">Configuration file</span></h2> <div> <p><span data-i18n="e0a60c7894b5526c5d4a72bb1cbcaf280745e0ef37af87485408aec3f5b10873/50" data-source="By default, the repository &lt;code&gt;config&lt;/code&gt; file is shared across all worktrees. If the config variables &lt;code&gt;core.bare&lt;/code&gt; or &lt;code&gt;core.worktree&lt;/code&gt; are present in the common config file and &lt;code&gt;extensions.worktreeConfig&lt;/code&gt; is disabled, then they will be applied to the main worktree only." onmousemove="i18n(this)">&Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &fcy;&acy;&jcy;&lcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  <code>config</code>  &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &ocy;&bcy;&shchcy;&icy;&mcy; &dcy;&lcy;&yacy; &vcy;&scy;&iecy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;. &IEcy;&scy;&lcy;&icy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ycy;&iecy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy;  <code>core.bare</code>  &icy;&lcy;&icy;  <code>core.worktree</code>  &pcy;&rcy;&icy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&tcy; &vcy; &ocy;&bcy;&shchcy;&iecy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy; &icy;  <code>extensions.worktreeConfig</code>  &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;, &tcy;&ocy; &ocy;&ncy;&icy; &bcy;&ucy;&dcy;&ucy;&tcy; &pcy;&rcy;&icy;&mcy;&iecy;&ncy;&yacy;&tcy;&softcy;&scy;&yacy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &kcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&mcy;&ucy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&ucy;.</span></p> <p><span data-i18n="5d9e162e0a3ebda1e144cdd0f7febb657711f9f1b46c4e2b4c18be96da341c7d/11" data-source="In order to have worktree-specific configuration, you can turn on the &lt;code&gt;worktreeConfig&lt;/code&gt; extension, e.g.:" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &icy;&mcy;&iecy;&tcy;&softcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&yucy;, &scy;&pcy;&iecy;&tscy;&icy;&fcy;&icy;&chcy;&ncy;&ucy;&yucy; &dcy;&lcy;&yacy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &vcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &rcy;&acy;&scy;&shcy;&icy;&rcy;&iecy;&ncy;&icy;&iecy;  <code>worktreeConfig</code> , &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;:</span></p> <div> <div> <pre class="hljs language-lua">$ git <span class="hljs-built_in">config</span> extensions.worktreeConfig <span class="hljs-literal">true</span></pre> </div> </div> <p><span data-i18n="7afbde3b9fdc2303a9597abd2e47a3837d4e928ef5fcba0b032f4b994e7513c5/08" data-source="In this mode, specific configuration stays in the path pointed by &lt;code&gt;git
rev-parse --git-path config.worktree&lt;/code&gt;. You can add or update configuration in this file with &lt;code&gt;git config --worktree&lt;/code&gt;. Older Git versions will refuse to access repositories with this extension." onmousemove="i18n(this)">&Vcy; &ecy;&tcy;&ocy;&mcy; &rcy;&iecy;&zhcy;&icy;&mcy;&iecy; &kcy;&ocy;&ncy;&kcy;&rcy;&iecy;&tcy;&ncy;&acy;&yacy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&yacy; &ocy;&scy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &pcy;&ucy;&tcy;&icy;, &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ocy;&mcy;  <code>git
rev-parse --git-path config.worktree</code> . &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &dcy;&ocy;&bcy;&acy;&vcy;&icy;&tcy;&softcy; &icy;&lcy;&icy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&yucy; &vcy; &ecy;&tcy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git config --worktree</code> . &Scy;&tcy;&acy;&rcy;&ycy;&iecy; &vcy;&iecy;&rcy;&scy;&icy;&icy;  Git  &ocy;&tcy;&kcy;&acy;&zhcy;&ucy;&tcy;&scy;&yacy; &ocy;&tcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&acy; &kcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;&mcy; &scy; &ecy;&tcy;&icy;&mcy; &rcy;&acy;&scy;&shcy;&icy;&rcy;&iecy;&ncy;&icy;&iecy;&mcy;.</span></p> <p><span data-i18n="f17db26da826ca2d01193a294eb4137ccbc16bbb75d5ac0cbb57f59668c4ba6d/d6" data-source="Note that in this file, the exception for &lt;code&gt;core.bare&lt;/code&gt; and &lt;code&gt;core.worktree&lt;/code&gt; is gone. If they exist in &lt;code&gt;$GIT_DIR/config&lt;/code&gt;, you must move them to the &lt;code&gt;config.worktree&lt;/code&gt; of the main worktree. You may also take this opportunity to review and move other configuration that you do not want to share to all worktrees:" onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &vcy; &ecy;&tcy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&ocy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&iecy; &dcy;&lcy;&yacy;  <code>core.bare</code>  &icy;  <code>core.worktree</code> . &IEcy;&scy;&lcy;&icy; &ocy;&ncy;&icy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&yucy;&tcy; &vcy;  <code>$GIT_DIR/config</code> , &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&scy;&tcy;&icy;&tcy;&softcy; &icy;&khcy; &vcy;  <code>config.worktree</code>  &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &vcy;&ocy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &ecy;&tcy;&ocy;&jcy; &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;&scy;&tcy;&softcy;&yucy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&iecy;&tcy;&softcy; &icy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&scy;&tcy;&icy;&tcy;&softcy; &dcy;&rcy;&ucy;&gcy;&ucy;&yucy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&yucy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &vcy;&ycy; &ncy;&iecy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy;&ocy; &vcy;&scy;&iecy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&khcy;:</span></p> <div> <ul> <li> <p><span data-i18n="9e1da1d3a2a5d2131dd54d20daedbdf97499798eddc94727787fda16e728c15d/23" data-source="&lt;code&gt;core.worktree&lt;/code&gt; should never be shared." onmousemove="i18n(this)"><code>core.worktree</code>  &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &scy;&ocy;&vcy;&mcy;&iecy;&scy;&tcy;&ncy;&ocy;.</span></p> </li> <li> <p><span data-i18n="a4035995e6b50f2156d267cea3beb5f3e10166ad3f3b941e9f82135e580f8e1b/da" data-source="&lt;code&gt;core.bare&lt;/code&gt; should not be shared if the value is &lt;code&gt;core.bare=true&lt;/code&gt;." onmousemove="i18n(this)"><code>core.bare</code>  &ncy;&iecy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &scy;&ocy;&vcy;&mcy;&iecy;&scy;&tcy;&ncy;&ocy;, &iecy;&scy;&lcy;&icy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; &rcy;&acy;&vcy;&ncy;&ocy;  <code>core.bare=true</code> .</span></p> </li> <li> <p><span data-i18n="4e4a9feb300d36c8deb3851764bf79d915e22127a345bb2df108f660dda6dff8/cc" data-source="&lt;code&gt;core.sparseCheckout&lt;/code&gt; should not be shared, unless you are sure you always use sparse checkout for all worktrees." onmousemove="i18n(this)"><code>core.sparseCheckout</code>  &ncy;&iecy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &scy;&ocy;&vcy;&mcy;&iecy;&scy;&tcy;&ncy;&ocy;, &iecy;&scy;&lcy;&icy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy;&ycy; &ncy;&iecy; &ucy;&vcy;&iecy;&rcy;&iecy;&ncy;&ycy;, &chcy;&tcy;&ocy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&iecy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ucy;&yucy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&ucy; &dcy;&lcy;&yacy; &vcy;&scy;&iecy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;.</span></p> </li> </ul> </div> <p><span data-i18n="afe4141c7f6873806a8a78e4c9e2969df3aa18a2154e6816d4dc8b91bcfdb267/da" data-source="See the documentation of &lt;code&gt;extensions.worktreeConfig&lt;/code&gt; in &lt;a href=&quot;git-config&quot;&gt;git-config[1]&lt;/a&gt; for more details." onmousemove="i18n(this)">&Bcy;&ocy;&lcy;&iecy;&iecy; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ucy;&yucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &scy;&mcy;. &vcy; &dcy;&ocy;&kcy;&ucy;&mcy;&iecy;&ncy;&tcy;&acy;&tscy;&icy;&icy;  <code>extensions.worktreeConfig</code>  &vcy;  <a href="git-config.html">git-config[1]</a> .</span></p> </div> <h2 class="text-body-emphasis"  id="_details"><span data-i18n="45989de49fb7f66dfe17a8fc26f3a02c7abcd74f7e8e6cf9f39fa0e3775780df/e3" data-source="Details" onmousemove="i18n(this)">Details</span></h2> <div> <p><span data-i18n="c1e2a4bcf52febe44c6cf8a3d0886ab65c5097ade117499759eb5b7643cad16a/66" data-source="Each linked worktree has a private sub-directory in the repository&amp;rsquo;s &lt;code&gt;$GIT_DIR/worktrees&lt;/code&gt; directory. The private sub-directory&amp;rsquo;s name is usually the base name of the linked worktree&amp;rsquo;s path, possibly appended with a number to make it unique. For example, when &lt;code&gt;$GIT_DIR=/path/main/.git&lt;/code&gt; the command &lt;code&gt;git worktree add /path/other/test-next next&lt;/code&gt; creates the linked worktree in &lt;code&gt;/path/other/test-next&lt;/code&gt; and also creates a &lt;code&gt;$GIT_DIR/worktrees/test-next&lt;/code&gt; directory (or &lt;code&gt;$GIT_DIR/worktrees/test-next1&lt;/code&gt; if &lt;code&gt;test-next&lt;/code&gt; is already taken)." onmousemove="i18n(this)">&Kcy;&acy;&zhcy;&dcy;&ocy;&iecy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &icy;&mcy;&iecy;&iecy;&tcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  private  &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>$GIT_DIR/worktrees</code>  &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;. &Icy;&mcy;&yacy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;  private  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy; &bcy;&acy;&zcy;&ocy;&vcy;&ocy;&iecy; &icy;&mcy;&yacy; &pcy;&ucy;&tcy;&icy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &kcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&mcy;&ucy;, &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &chcy;&icy;&scy;&lcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy; &ucy;&ncy;&icy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&mcy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &kcy;&ocy;&gcy;&dcy;&acy;  <code>$GIT_DIR=/path/main/.git</code> , &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>git worktree add /path/other/test-next next</code>  &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &vcy;  <code>/path/other/test-next</code> , &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>$GIT_DIR/worktrees/test-next</code>  (&icy;&lcy;&icy;  <code>$GIT_DIR/worktrees/test-next1</code> , &iecy;&scy;&lcy;&icy;  <code>test-next</code>  &ucy;&zhcy;&iecy; &zcy;&acy;&ncy;&yacy;&tcy;).</span></p> <p><span data-i18n="55adee1ce5353732853176fbe7bb058f8f0f491f7dbc43064c4d2bbed8057848/cc" data-source="Within a linked worktree, &lt;code&gt;$GIT_DIR&lt;/code&gt; is set to point to this private directory (e.g. &lt;code&gt;/path/main/.git/worktrees/test-next&lt;/code&gt; in the example) and &lt;code&gt;$GIT_COMMON_DIR&lt;/code&gt; is set to point back to the main worktree&amp;rsquo;s &lt;code&gt;$GIT_DIR&lt;/code&gt; (e.g. &lt;code&gt;/path/main/.git&lt;/code&gt;). These settings are made in a &lt;code&gt;.git&lt;/code&gt; file located at the top directory of the linked worktree." onmousemove="i18n(this)">&Vcy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;  <code>$GIT_DIR</code>  &ncy;&acy;&scy;&tcy;&rcy;&ocy;&iecy;&ncy; &tcy;&acy;&kcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy; &ncy;&acy; &ecy;&tcy;&ocy;&tcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  private  (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>/path/main/.git/worktrees/test-next</code>  &vcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&iecy;), &acy;  <code>$GIT_COMMON_DIR</code>  &ncy;&acy;&scy;&tcy;&rcy;&ocy;&iecy;&ncy; &tcy;&acy;&kcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy; &ncy;&acy;  <code>$GIT_DIR</code>  &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>/path/main/.git</code>  ). &Ecy;&tcy;&icy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&jcy;&kcy;&icy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&yucy;&tcy;&scy;&yacy; &vcy; &fcy;&acy;&jcy;&lcy;&iecy;  <code>.git</code> , &rcy;&acy;&scy;&pcy;&ocy;&lcy;&ocy;&zhcy;&iecy;&ncy;&ncy;&ocy;&mcy; &vcy; &vcy;&iecy;&rcy;&khcy;&ncy;&iecy;&mcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;.</span></p> <p><span data-i18n="3bd1651664e64eb218837a0d6a1c629037ca34141af8fb4a4d03ce332d4c5a61/bf" data-source="Path resolution via &lt;code&gt;git rev-parse --git-path&lt;/code&gt; uses either &lt;code&gt;$GIT_DIR&lt;/code&gt; or &lt;code&gt;$GIT_COMMON_DIR&lt;/code&gt; depending on the path. For example, in the linked worktree &lt;code&gt;git rev-parse --git-path HEAD&lt;/code&gt; returns &lt;code&gt;/path/main/.git/worktrees/test-next/HEAD&lt;/code&gt; (not &lt;code&gt;/path/other/test-next/.git/HEAD&lt;/code&gt; or &lt;code&gt;/path/main/.git/HEAD&lt;/code&gt;) while &lt;code&gt;git
rev-parse --git-path refs/heads/master&lt;/code&gt; uses &lt;code&gt;$GIT_COMMON_DIR&lt;/code&gt; and returns &lt;code&gt;/path/main/.git/refs/heads/master&lt;/code&gt;, since refs are shared across all worktrees, except &lt;code&gt;refs/bisect&lt;/code&gt;, &lt;code&gt;refs/worktree&lt;/code&gt; and &lt;code&gt;refs/rewritten&lt;/code&gt;." onmousemove="i18n(this)">&Rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&icy;&iecy; &pcy;&ucy;&tcy;&icy; &chcy;&iecy;&rcy;&iecy;&zcy;  <code>git rev-parse --git-path</code>  &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &lcy;&icy;&bcy;&ocy;  <code>$GIT_DIR</code> , &lcy;&icy;&bcy;&ocy;  <code>$GIT_COMMON_DIR</code>  &vcy; &zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy;&scy;&tcy;&icy; &ocy;&tcy; &pcy;&ucy;&tcy;&icy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &vcy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;  <code>git rev-parse --git-path HEAD</code>  &vcy;&ocy;&zcy;&vcy;&rcy;&acy;&shchcy;&acy;&iecy;&tcy;  <code>/path/main/.git/worktrees/test-next/HEAD</code>  (&acy; &ncy;&iecy;  <code>/path/other/test-next/.git/HEAD</code>  &icy;&lcy;&icy;  <code>/path/main/.git/HEAD</code> ), &tcy;&ocy;&gcy;&dcy;&acy; &kcy;&acy;&kcy;  <code>git
rev-parse --git-path refs/heads/master</code>  &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;  <code>$GIT_COMMON_DIR</code>  &icy; &vcy;&ocy;&zcy;&vcy;&rcy;&acy;&shchcy;&acy;&iecy;&tcy;  <code>/path/main/.git/refs/heads/master</code> , &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &scy;&scy;&ycy;&lcy;&kcy;&icy; &yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &ocy;&bcy;&shchcy;&icy;&mcy;&icy; &dcy;&lcy;&yacy; &vcy;&scy;&iecy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;, &kcy;&rcy;&ocy;&mcy;&iecy;  <code>refs/bisect</code> ,  <code>refs/worktree</code>  &icy;  <code>refs/rewritten</code> .</span></p> <p><span data-i18n="43779531f144b4a2313fd236b286cc371f39f75833a4a3d6c5ab8425b136d1a0/2f" data-source="See &lt;a href=&quot;gitrepository-layout&quot;&gt;gitrepository-layout[5]&lt;/a&gt; for more information. The rule of thumb is do not make any assumption about whether a path belongs to &lt;code&gt;$GIT_DIR&lt;/code&gt; or &lt;code&gt;$GIT_COMMON_DIR&lt;/code&gt; when you need to directly access something inside &lt;code&gt;$GIT_DIR&lt;/code&gt;. Use &lt;code&gt;git rev-parse --git-path&lt;/code&gt; to get the final path." onmousemove="i18n(this)">&Scy;&mcy;.  <a href="gitrepository-layout.html">gitrepository-layout[5]</a>  &dcy;&lcy;&yacy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&icy;&yacy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&jcy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&icy;. &Ecy;&mcy;&pcy;&icy;&rcy;&icy;&chcy;&iecy;&scy;&kcy;&ocy;&iecy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&ocy;: &ncy;&iecy; &dcy;&iecy;&lcy;&acy;&jcy;&tcy;&iecy; &ncy;&icy;&kcy;&acy;&kcy;&icy;&khcy; &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&ocy;&zhcy;&iecy;&ncy;&icy;&jcy; &ocy; &tcy;&ocy;&mcy;, &pcy;&rcy;&icy;&ncy;&acy;&dcy;&lcy;&iecy;&zhcy;&icy;&tcy; &lcy;&icy; &pcy;&ucy;&tcy;&softcy;  <code>$GIT_DIR</code>  &icy;&lcy;&icy;  <code>$GIT_COMMON_DIR</code> , &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &ncy;&acy;&pcy;&rcy;&yacy;&mcy;&ucy;&yucy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy; &kcy; &chcy;&iecy;&mcy;&ucy;-&tcy;&ocy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy;  <code>$GIT_DIR</code> . &Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git rev-parse --git-path</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &ocy;&kcy;&ocy;&ncy;&chcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&jcy; &pcy;&ucy;&tcy;&softcy;.</span></p> <p><span data-i18n="463e955237de0873b064710b38bff048587df8f2b0ae62d503cfff41ec20d287/b5" data-source="If you manually move a linked worktree, you need to update the &lt;code&gt;gitdir&lt;/code&gt; file in the entry&amp;rsquo;s directory. For example, if a linked worktree is moved to &lt;code&gt;/newpath/test-next&lt;/code&gt; and its &lt;code&gt;.git&lt;/code&gt; file points to &lt;code&gt;/path/main/.git/worktrees/test-next&lt;/code&gt;, then update &lt;code&gt;/path/main/.git/worktrees/test-next/gitdir&lt;/code&gt; to reference &lt;code&gt;/newpath/test-next&lt;/code&gt; instead. Better yet, run &lt;code&gt;git worktree repair&lt;/code&gt; to reestablish the connection automatically." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&acy;&iecy;&tcy;&iecy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &vcy;&acy;&mcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy;  <code>gitdir</code>  &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &iecy;&scy;&lcy;&icy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy;  <code>/newpath/test-next</code>  &icy; &iecy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;  <code>.git</code>  &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ncy;&acy;  <code>/path/main/.git/worktrees/test-next</code>  , &tcy;&ocy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&iecy;  <code>/path/main/.git/worktrees/test-next/gitdir</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&ncy; &scy;&scy;&ycy;&lcy;&acy;&lcy;&scy;&yacy; &ncy;&acy;  <code>/newpath/test-next</code> . &Acy; &iecy;&shchcy;&iecy; &lcy;&ucy;&chcy;&shcy;&iecy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;  <code>git worktree repair</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&lcy;&ocy;&scy;&softcy;.</span></p> <p><span data-i18n="0d709b14dedabdacf75effd52737f96dc64dab9c4c233913b5844d3716345541/d7" data-source="To prevent a &lt;code&gt;$GIT_DIR/worktrees&lt;/code&gt; entry from being pruned (which can be useful in some situations, such as when the entry&amp;rsquo;s worktree is stored on a portable device), use the &lt;code&gt;git worktree lock&lt;/code&gt; command, which adds a file named &lt;code&gt;locked&lt;/code&gt; to the entry&amp;rsquo;s directory. The file contains the reason in plain text. For example, if a linked worktree&amp;rsquo;s &lt;code&gt;.git&lt;/code&gt; file points to &lt;code&gt;/path/main/.git/worktrees/test-next&lt;/code&gt; then a file named &lt;code&gt;/path/main/.git/worktrees/test-next/locked&lt;/code&gt; will prevent the &lt;code&gt;test-next&lt;/code&gt; entry from being pruned. See &lt;a href=&quot;gitrepository-layout&quot;&gt;gitrepository-layout[5]&lt;/a&gt; for details." onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&tcy;&icy;&tcy;&softcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy;  <code>$GIT_DIR/worktrees</code>  (&chcy;&tcy;&ocy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ocy; &vcy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy; &scy;&icy;&tcy;&ucy;&acy;&tscy;&icy;&yacy;&khcy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &kcy;&ocy;&gcy;&dcy;&acy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &zcy;&acy;&pcy;&icy;&scy;&icy; &khcy;&rcy;&acy;&ncy;&icy;&tcy;&scy;&yacy; &ncy;&acy; &pcy;&ocy;&rcy;&tcy;&acy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;&iecy;), &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;  <code>git worktree lock</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &fcy;&acy;&jcy;&lcy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>locked</code>  &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &zcy;&acy;&pcy;&icy;&scy;&icy;. &Fcy;&acy;&jcy;&lcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&ucy; &vcy; &vcy;&icy;&dcy;&iecy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;&gcy;&ocy; &tcy;&iecy;&kcy;&scy;&tcy;&acy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &iecy;&scy;&lcy;&icy; &fcy;&acy;&jcy;&lcy;  <code>.git</code>  &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ncy;&acy;  <code>/path/main/.git/worktrees/test-next</code> , &tcy;&ocy; &fcy;&acy;&jcy;&lcy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>/path/main/.git/worktrees/test-next/locked</code>  &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&tcy;&icy;&tcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy;  <code>test-next</code> . &Pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &vcy;  <a href="gitrepository-layout.html">gitrepository-layout[5]</a> .</span></p> <p><span data-i18n="2fdd2a5cc4b80a3da156bb5e585c751911de395cb68636e8aa0bf50ec7928153/38" data-source="When &lt;code&gt;extensions.worktreeConfig&lt;/code&gt; is enabled, the config file &lt;code&gt;.git/worktrees/&amp;lt;id&amp;gt;/config.worktree&lt;/code&gt; is read after &lt;code&gt;.git/config&lt;/code&gt; is." onmousemove="i18n(this)">&Kcy;&ocy;&gcy;&dcy;&acy;  <code>extensions.worktreeConfig</code>  &vcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;, &fcy;&acy;&jcy;&lcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy;  <code>.git/worktrees/&lt;id&gt;/config.worktree</code>  &scy;&chcy;&icy;&tcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&ocy;&scy;&lcy;&iecy;  <code>.git/config</code> .</span></p> </div> <h2 class="text-body-emphasis"  id="_list_output_format"><span data-i18n="8abbc40d6629311aa816f2450cfe470255324f4168d5d1ea0630b7e066c0b2b6/40" data-source="List output format" onmousemove="i18n(this)">&Fcy;&ocy;&rcy;&mcy;&acy;&tcy; &vcy;&ycy;&vcy;&ocy;&dcy;&acy; &scy;&pcy;&icy;&scy;&kcy;&acy;</span></h2> <div> <p><span data-i18n="02556ff2ec3b730c1b473f4388b576ddb8d7724c04f8338824e03f54f297f901/76" data-source="The &lt;code&gt;worktree list&lt;/code&gt; command has two output formats. The default format shows the details on a single line with columns. For example:" onmousemove="i18n(this)">&Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>worktree list</code>  &icy;&mcy;&iecy;&iecy;&tcy; &dcy;&vcy;&acy; &fcy;&ocy;&rcy;&mcy;&acy;&tcy;&acy; &vcy;&ycy;&vcy;&ocy;&dcy;&acy;. &Fcy;&ocy;&rcy;&mcy;&acy;&tcy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ucy;&yucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &vcy; &ocy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&iecy; &scy;&ocy; &scy;&tcy;&ocy;&lcy;&bcy;&tscy;&acy;&mcy;&icy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;:</span></p> <div> <div> <pre class="hljs language-bash">$ git worktree list
/path/to/bare-source            (bare)
/path/to/linked-worktree        abcd1234 [master]
/path/to/other-linked-worktree  1234abc  (detached HEAD)</pre> </div> </div> <p><span data-i18n="5089dcb5dd29eac2490425196a8b20105e01c5ff67d8e532ad7c4199f9bc591a/f6" data-source="The command also shows annotations for each worktree, according to its state. These annotations are:" onmousemove="i18n(this)">&Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &tcy;&acy;&kcy;&zhcy;&iecy; &ocy;&tcy;&ocy;&bcy;&rcy;&acy;&zhcy;&acy;&iecy;&tcy; &acy;&ncy;&ncy;&ocy;&tcy;&acy;&tscy;&icy;&icy; &dcy;&lcy;&yacy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &vcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&icy;&icy; &scy; &iecy;&gcy;&ocy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;&mcy;. &Ecy;&tcy;&icy; &acy;&ncy;&ncy;&ocy;&tcy;&acy;&tscy;&icy;&icy;:</span></p> <div> <ul> <li> <p><span data-i18n="de9368376e0cbfcb94ba2c2bfdc29a797b9e90fdcb259d1f4fce91208e5a22e2/8f" data-source="&lt;code&gt;locked&lt;/code&gt;, if the worktree is locked." onmousemove="i18n(this)"><code>locked</code>  , &iecy;&scy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &zcy;&acy;&bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ocy;.</span></p> </li> <li> <p><span data-i18n="2feb0d0dc140d5fcf79ef30fb34d299f66e123828abc2fd8c5cd779f8af22db2/10" data-source="&lt;code&gt;prunable&lt;/code&gt;, if the worktree can be pruned via &lt;code&gt;git worktree prune&lt;/code&gt;." onmousemove="i18n(this)"><code>prunable</code> , &iecy;&scy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ocy;&bcy;&rcy;&iecy;&zcy;&acy;&tcy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git worktree prune</code> .</span></p> </li> </ul> </div> <div> <div> <pre class="hljs language-bash">$ git worktree list
/path/to/linked-worktree    abcd1234 [master]
/path/to/locked-worktree    acbd5678 (brancha) locked
/path/to/prunable-worktree  5678abc  (detached HEAD) prunable</pre> </div> </div> <p><span data-i18n="7388f31cacf382cabed25fba1bb295c12c9ed1fdbaeafe6d1430948fd7a24fe0/41" data-source="For these annotations, a reason might also be available and this can be seen using the verbose mode. The annotation is then moved to the next line indented followed by the additional information." onmousemove="i18n(this)">&Dcy;&lcy;&yacy; &ecy;&tcy;&icy;&khcy; &acy;&ncy;&ncy;&ocy;&tcy;&acy;&tscy;&icy;&jcy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&acy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy; &vcy; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&mcy; &rcy;&iecy;&zhcy;&icy;&mcy;&iecy;. &Zcy;&acy;&tcy;&iecy;&mcy; &acy;&ncy;&ncy;&ocy;&tcy;&acy;&tscy;&icy;&yacy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &scy;&tcy;&rcy;&ocy;&kcy;&ucy; &scy; &ocy;&tcy;&scy;&tcy;&ucy;&pcy;&ocy;&mcy;, &zcy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&jcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&acy;&yacy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yacy;.</span></p> <div> <div> <pre class="hljs language-lua">$ git worktree list <span class="hljs-comment">--verbose</span>
/<span class="hljs-built_in">path</span>/to/linked-worktree              abcd1234 [master]
/<span class="hljs-built_in">path</span>/to/locked-worktree-no-reason    abcd5678 (detached HEAD) locked
/<span class="hljs-built_in">path</span>/to/locked-worktree-with-reason  <span class="hljs-number">1234</span>abcd (brancha)
        locked: worktree <span class="hljs-built_in">path</span> is mounted on a portable device
/<span class="hljs-built_in">path</span>/to/prunable-worktree            <span class="hljs-number">5678</span>abc1 (detached HEAD)
        prunable: gitdir file points to non-existent location</pre> </div> </div> <p><span data-i18n="4dce96598e22974303c779bcd52237b308883bd47ee9d6ab745f334b90b78ae7/20" data-source="Note that the annotation is moved to the next line if the additional information is available, otherwise it stays on the same line as the worktree itself." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &acy;&ncy;&ncy;&ocy;&tcy;&acy;&tscy;&icy;&yacy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &scy;&tcy;&rcy;&ocy;&kcy;&ucy;, &iecy;&scy;&lcy;&icy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&acy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&acy;&yacy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yacy;, &vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &ocy;&ncy;&acy; &ocy;&scy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy; &tcy;&ocy;&jcy; &zhcy;&iecy; &scy;&tcy;&rcy;&ocy;&kcy;&iecy;, &chcy;&tcy;&ocy; &icy; &scy;&acy;&mcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;.</span></p> <div> <h3 class="text-body-emphasis"  id="_porcelain_format"><span data-i18n="f4be9801d8f180c4d19f1a0aa83ba158da3ab8a11a610e482ff07182a34bd2fa/fd" data-source="Porcelain Format" onmousemove="i18n(this)">Porcelain Format</span></h3> <p><span data-i18n="d544ebe25b21a404f03937326b86453d707dd35821672ed5c635410d8a15db5d/c0" data-source="The porcelain format has a line per attribute. If &lt;code&gt;-z&lt;/code&gt; is given then the lines are terminated with NUL rather than a newline. Attributes are listed with a label and value separated by a single space. Boolean attributes (like &lt;code&gt;bare&lt;/code&gt; and &lt;code&gt;detached&lt;/code&gt;) are listed as a label only, and are present only if the value is true. Some attributes (like &lt;code&gt;locked&lt;/code&gt;) can be listed as a label only or with a value depending upon whether a reason is available. The first attribute of a worktree is always &lt;code&gt;worktree&lt;/code&gt;, an empty line indicates the end of the record. For example:" onmousemove="i18n(this)">&Fcy;&ocy;&rcy;&mcy;&acy;&tcy; &fcy;&acy;&rcy;&fcy;&ocy;&rcy;&acy; &icy;&mcy;&iecy;&iecy;&tcy; &scy;&tcy;&rcy;&ocy;&kcy;&ucy; &dcy;&lcy;&yacy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &acy;&tcy;&rcy;&icy;&bcy;&ucy;&tcy;&acy;. &IEcy;&scy;&lcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;  <code>-z</code> , &scy;&tcy;&rcy;&ocy;&kcy;&icy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&acy;&yucy;&tcy;&scy;&yacy; NUL, &acy; &ncy;&iecy; &ncy;&ocy;&vcy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&ocy;&jcy;. &Acy;&tcy;&rcy;&icy;&bcy;&ucy;&tcy;&ycy; &pcy;&iecy;&rcy;&iecy;&chcy;&icy;&scy;&lcy;&iecy;&ncy;&ycy; &scy; &mcy;&iecy;&tcy;&kcy;&ocy;&jcy; &icy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy;&mcy;, &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy; &ocy;&dcy;&ncy;&icy;&mcy; &pcy;&rcy;&ocy;&bcy;&iecy;&lcy;&ocy;&mcy;. &Acy;&tcy;&rcy;&icy;&bcy;&ucy;&tcy;&ycy;  Boolean  (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>bare</code>  &icy;  <code>detached</code> ) &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &kcy;&acy;&kcy; &mcy;&iecy;&tcy;&kcy;&icy; &icy; &pcy;&rcy;&icy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&tcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy; &tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;, &iecy;&scy;&lcy;&icy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; &icy;&scy;&tcy;&icy;&ncy;&ncy;&ocy;. &Ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &acy;&tcy;&rcy;&icy;&bcy;&ucy;&tcy;&ycy; (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>locked</code> ) &mcy;&ocy;&gcy;&ucy;&tcy; &bcy;&ycy;&tcy;&softcy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &kcy;&acy;&kcy; &mcy;&iecy;&tcy;&kcy;&icy; &icy;&lcy;&icy; &scy;&ocy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy;&mcy; &vcy; &zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy;&scy;&tcy;&icy; &ocy;&tcy; &tcy;&ocy;&gcy;&ocy;, &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&acy; &lcy;&icy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&acy;. &Pcy;&iecy;&rcy;&vcy;&ycy;&mcy; &acy;&tcy;&rcy;&icy;&bcy;&ucy;&tcy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy;  <code>worktree</code> , &pcy;&ucy;&scy;&tcy;&acy;&yacy; &scy;&tcy;&rcy;&ocy;&kcy;&acy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ncy;&acy; &kcy;&ocy;&ncy;&iecy;&tscy; &zcy;&acy;&pcy;&icy;&scy;&icy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;:</span></p> <div> <div> <pre class="hljs language-bash">$ git worktree list --porcelain
worktree /path/to/bare-source
bare

worktree /path/to/linked-worktree
HEAD abcd1234abcd1234abcd1234abcd1234abcd1234
branch refs/heads/master

worktree /path/to/other-linked-worktree
HEAD 1234abc1234abc1234abc1234abc1234abc1234a
detached

worktree /path/to/linked-worktree-locked-no-reason
HEAD 5678abc5678abc5678abc5678abc5678abc5678c
branch refs/heads/locked-no-reason
locked

worktree /path/to/linked-worktree-locked-with-reason
HEAD 3456def3456def3456def3456def3456def3456b
branch refs/heads/locked-with-reason
locked reason why is locked

worktree /path/to/linked-worktree-prunable
HEAD 1233def1234def1234def1234def1234def1234b
detached
prunable gitdir file points to non-existent location</pre> </div> </div> <p><span data-i18n="2bb7a425ce8815aeb381ca9704ffa50a5f4c1941115ad9c041c949e06f5dbf2a/23" data-source="Unless &lt;code&gt;-z&lt;/code&gt; is used any &amp;quot;unusual&amp;quot; characters in the lock reason such as newlines are escaped and the entire reason is quoted as explained for the configuration variable &lt;code&gt;core.quotePath&lt;/code&gt; (see &lt;a href=&quot;git-config&quot;&gt;git-config[1]&lt;/a&gt;). For Example:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>-z</code> , &lcy;&yucy;&bcy;&ycy;&iecy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&ycy;  &quot;unusual&quot;  &vcy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&iecy; &bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ocy;&vcy;&kcy;&icy;, &tcy;&acy;&kcy;&icy;&iecy; &kcy;&acy;&kcy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&ycy; &ncy;&ocy;&vcy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;, &ecy;&kcy;&rcy;&acy;&ncy;&icy;&rcy;&ucy;&yucy;&tcy;&scy;&yacy;, &icy; &vcy;&scy;&yacy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&acy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; &kcy;&acy;&vcy;&ycy;&chcy;&kcy;&acy;&khcy;, &kcy;&acy;&kcy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&ocy; &dcy;&lcy;&yacy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&jcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy;  <code>core.quotePath</code>  (&scy;&mcy;.  <a href="git-config.html">git-config[1]</a> ). &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;:</span></p> <div> <div> <pre class="hljs language-python-repl">$ git worktree list --porcelain
<span class="hljs-meta prompt_">...</span>
locked &quot;reason\nwhy is locked&quot;
<span class="hljs-meta prompt_">...</span></pre> </div> </div> </div> </div> <h2 class="text-body-emphasis"  id="_examples"><span data-i18n="e68ee04dff59551b7d1ae07a2f8a00dc61d841628948da3d2781630706a05e92/38" data-source="Examples" onmousemove="i18n(this)">Examples</span></h2> <div> <p><span data-i18n="9db3d381a34b51e73e52927878d0e9e6ebfb2523f93d6e9f6ebd86916e6d883b/41" data-source="You are in the middle of a refactoring session and your boss comes in and demands that you fix something immediately. You might typically use &lt;a href=&quot;git-stash&quot;&gt;git-stash[1]&lt;/a&gt; to store your changes away temporarily, however, your working tree is in such a state of disarray (with new, moved, and removed files, and other bits and pieces strewn around) that you don&amp;rsquo;t want to risk disturbing any of it. Instead, you create a temporary linked worktree to make the emergency fix, remove it when done, and then resume your earlier refactoring session." onmousemove="i18n(this)">&Vcy;&ycy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&iecy;&scy;&softcy; &vcy; &scy;&iecy;&rcy;&iecy;&dcy;&icy;&ncy;&iecy; &scy;&iecy;&acy;&ncy;&scy;&acy; &rcy;&iecy;&fcy;&acy;&kcy;&tcy;&ocy;&rcy;&icy;&ncy;&gcy;&acy;, &icy; &pcy;&rcy;&icy;&khcy;&ocy;&dcy;&icy;&tcy; &vcy;&acy;&shcy; &ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&icy;&kcy; &icy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&ycy; &ncy;&iecy;&mcy;&iecy;&dcy;&lcy;&iecy;&ncy;&ncy;&ocy; &chcy;&tcy;&ocy;-&tcy;&ocy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&icy;&lcy;&icy;. &Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <a href="git-stash.html">git-stash[1]</a>  &dcy;&lcy;&yacy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &khcy;&rcy;&acy;&ncy;&iecy;&ncy;&icy;&yacy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy;, &ocy;&dcy;&ncy;&acy;&kcy;&ocy; &vcy;&acy;&shcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &vcy; &tcy;&acy;&kcy;&ocy;&mcy; &bcy;&iecy;&scy;&pcy;&ocy;&rcy;&yacy;&dcy;&kcy;&iecy; (&scy; &ncy;&ocy;&vcy;&ycy;&mcy;&icy;, &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy; &icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy; &fcy;&acy;&jcy;&lcy;&acy;&mcy;&icy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &fcy;&rcy;&acy;&gcy;&mcy;&iecy;&ncy;&tcy;&acy;&mcy;&icy;, &rcy;&acy;&zcy;&bcy;&rcy;&ocy;&scy;&acy;&ncy;&ncy;&ycy;&mcy;&icy; &vcy;&ocy;&kcy;&rcy;&ucy;&gcy;), &chcy;&tcy;&ocy; &vcy;&ycy; &ncy;&iecy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &rcy;&icy;&scy;&kcy;&ocy;&vcy;&acy;&tcy;&softcy; &ncy;&acy;&rcy;&ucy;&shcy;&acy;&yacy; &chcy;&tcy;&ocy;-&lcy;&icy;&bcy;&ocy; &icy;&zcy; &ecy;&tcy;&ocy;&gcy;&ocy;. &Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &vcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy;&iecy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&iecy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &dcy;&lcy;&yacy; &ecy;&kcy;&scy;&tcy;&rcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy;, &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy;&iecy; &iecy;&gcy;&ocy; &pcy;&ocy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&icy;&icy; &icy; &zcy;&acy;&tcy;&iecy;&mcy; &vcy;&ocy;&zcy;&ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&iecy;&tcy;&iecy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&icy;&jcy; &scy;&iecy;&acy;&ncy;&scy; &rcy;&iecy;&fcy;&acy;&kcy;&tcy;&ocy;&rcy;&icy;&ncy;&gcy;&acy;.</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git worktree add -b emergency-fix ../temp master</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">pushd</span> ../temp</span>
<span class="hljs-meta prompt_"># </span><span class="language-bash">... hack hack hack ...</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git commit -a -m <span class="hljs-string">&apos;emergency fix for boss&apos;</span></span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">popd</span></span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git worktree remove ../temp</span></pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_bugs"><span data-i18n="ff7c5467ce496637e5ba10662b7a90cde4ed9f8ef33f06fab0893b1c6c800845/88" data-source="Bugs" onmousemove="i18n(this)">Bugs</span></h2> <div> <p><span data-i18n="ba469b0cdc2ff7351ac1f7946be68691d9ec7167a106e09bb6621e42c5f1542a/44" data-source="Multiple checkout in general is still experimental, and the support for submodules is incomplete. It is NOT recommended to make multiple checkouts of a superproject." onmousemove="i18n(this)">&Mcy;&ncy;&ocy;&zhcy;&iecy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&acy;&yacy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&acy; &vcy; &tscy;&iecy;&lcy;&ocy;&mcy; &vcy;&scy;&iecy; &iecy;&shchcy;&iecy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &ecy;&kcy;&scy;&pcy;&iecy;&rcy;&icy;&mcy;&iecy;&ncy;&tcy;&acy;&lcy;&softcy;&ncy;&ocy;&jcy;, &acy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&kcy;&acy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy; &ncy;&iecy;&pcy;&ocy;&lcy;&ncy;&acy;&yacy;. &Ncy;&IEcy; &rcy;&iecy;&kcy;&ocy;&mcy;&iecy;&ncy;&dcy;&ucy;&iecy;&tcy;&scy;&yacy; &pcy;&rcy;&ocy;&icy;&zcy;&vcy;&ocy;&dcy;&icy;&tcy;&softcy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&ocy;&kcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;.</span></p> </div><address>
<p>
    &copy; 2012&ndash;2024 Scott Chacon and others<br/>Licensed under the MIT License.<br/>
<a href="https://git-scm.com/docs/git-worktree">https://git-scm.com/docs/git-worktree</a>
</p>
</address>                </article>
            </main>

            <br>
            <br>
            <hr>

                            <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6424571640879890"
     data-ad-slot="3954319254"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>            
        </div>

        <!-- -->

        <div class="col-md-3">
            <br>
            <form action="-index-.html">
                <div class="input-group">
                    <input class="form-control" type="search" name="q" placeholder="Search for Git" required>
                    <button class="btn btn-primary" type="submit">
                        <i class="bi bi-search"></i>
                    </button>
                </div>
            </form>
            <br>

                            <div class="list-group list-group-flush">
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-write-tree.html">
                            git write-tree                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitattributes.html">
                            gitattributes                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitcli.html">
                            gitcli                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitcore-tutorial.html">
                            gitcore tutorial                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitcredentials.html">
                            gitcredentials                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitcvs-migration.html">
                            gitcvs migration                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitdiffcore.html">
                            gitdiffcore                        </a>
                                    </div>
            
            <br>
            <div class="my-3">
                   <ins class="adsbygoogle"
        style="display:block; text-align:center;"
        data-ad-layout="in-article"
        data-ad-format="fluid"
        data-ad-client="ca-pub-6424571640879890"
        data-ad-slot="3777011170"></ins>
<script>
    (adsbygoogle = window.adsbygoogle || []).push({});
</script>            </div>
            <br>

            
            
        </div>
    </div>
</div>    <!--/sse-->

    <footer>
        <br>
        <div class="container">
            <div class="row">
                <div class="col">
                    <hr>
                    <div class="row">
                        <div class="col-md-10">
                            <ul class="nav">
                                <li class="nav-item">
                                    <a class="nav-link ps-0" href="https://runebook.dev/">Help us Improve Translation</a>
                                </li>
                                                            </ul>
                        </div>
                        <div class="col-md-2 text-end">
                            <a href="git-worktree.html#" class="fs-5" aria-label="Top">
                                <i class="bi bi-arrow-up-square-fill"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
    </footer>
    <script src="../../../runebook.js"></script>
</body>

</html>